diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..5fafbf7b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,256 @@ +root = true + +[*] +charset = utf-8 +indent_size = 4 +indent_style = space +insert_final_newline = true +max_line_length = 500 +# tab_width = 4 +# ij_continuation_indent_size = 4 + +[*.json] +indent_size = 2 + +[*.java] +indent_size = 2 +# tab_width = 8 +# ij_continuation_indent_size = 4 +# ij_java_align_consecutive_assignments = false +# ij_java_align_consecutive_variable_declarations = false +# ij_java_align_group_field_declarations = false +# ij_java_align_multiline_annotation_parameters = false +# ij_java_align_multiline_array_initializer_expression = true +# ij_java_align_multiline_assignment = true +# ij_java_align_multiline_binary_operation = true +# ij_java_align_multiline_chained_methods = true +# ij_java_align_multiline_extends_list = true +# ij_java_align_multiline_for = true +# ij_java_align_multiline_method_parentheses = false +# ij_java_align_multiline_parameters = true +# ij_java_align_multiline_parameters_in_calls = true +# ij_java_align_multiline_parenthesized_expression = true +# ij_java_align_multiline_resources = true +# ij_java_align_multiline_ternary_operation = true +# ij_java_align_multiline_throws_list = true +# ij_java_align_subsequent_simple_methods = false +# ij_java_align_throws_keyword = false +# ij_java_annotation_parameter_wrap = off +# ij_java_array_initializer_new_line_after_left_brace = false +# ij_java_array_initializer_right_brace_on_new_line = false +# ij_java_array_initializer_wrap = off +# ij_java_assert_statement_colon_on_next_line = false +# ij_java_assert_statement_wrap = off +# ij_java_assignment_wrap = off +# ij_java_binary_operation_sign_on_next_line = true +# ij_java_binary_operation_wrap = off +# ij_java_blank_lines_after_anonymous_class_header = 0 +ij_java_blank_lines_after_class_header = 1 +ij_java_blank_lines_after_imports = 1 +# ij_java_blank_lines_after_package = 1 +# ij_java_blank_lines_around_class = 1 +# ij_java_blank_lines_around_field = 0 +# ij_java_blank_lines_around_field_in_interface = 0 +# ij_java_blank_lines_around_initializer = 1 +# ij_java_blank_lines_around_method = 1 +# ij_java_blank_lines_around_method_in_interface = 1 +# ij_java_blank_lines_before_class_end = 0 +# ij_java_blank_lines_before_imports = 1 +# ij_java_blank_lines_before_method_body = 0 +# ij_java_blank_lines_before_package = 0 +# ij_java_block_brace_style = end_of_line +# ij_java_block_comment_at_first_column = true +# ij_java_call_parameters_new_line_after_left_paren = false +# ij_java_call_parameters_right_paren_on_new_line = false +# ij_java_call_parameters_wrap = off +# ij_java_case_statement_on_separate_line = true +# ij_java_catch_on_new_line = false +# ij_java_class_annotation_wrap = split_into_lines +# ij_java_class_brace_style = end_of_line +ij_java_class_count_to_use_import_on_demand = 99 +# ij_java_class_names_in_javadoc = 1 +# ij_java_do_not_indent_top_level_class_members = false +# ij_java_do_not_wrap_after_single_annotation = false +# ij_java_do_while_brace_force = always +# ij_java_doc_add_blank_line_after_description = true +# ij_java_doc_add_blank_line_after_param_comments = false +# ij_java_doc_add_blank_line_after_return = false +# ij_java_doc_add_p_tag_on_empty_lines = true +# ij_java_doc_align_exception_comments = true +# ij_java_doc_align_param_comments = true +# ij_java_doc_do_not_wrap_if_one_line = false +# ij_java_doc_enable_formatting = true +# ij_java_doc_enable_leading_asterisks = true +# ij_java_doc_indent_on_continuation = false +# ij_java_doc_keep_empty_lines = true +# ij_java_doc_keep_empty_parameter_tag = true +# ij_java_doc_keep_empty_return_tag = true +# ij_java_doc_keep_empty_throws_tag = true +# ij_java_doc_keep_invalid_tags = true +# ij_java_doc_param_description_on_new_line = false +# ij_java_doc_preserve_line_breaks = false +# ij_java_doc_use_throws_not_exception_tag = true +# ij_java_else_on_new_line = true +# ij_java_entity_dd_suffix = EJB +# ij_java_entity_eb_suffix = Bean +# ij_java_entity_hi_suffix = Home +# ij_java_entity_lhi_prefix = Local +# ij_java_entity_lhi_suffix = Home +# ij_java_entity_li_prefix = Local +# ij_java_entity_pk_class = java.lang.String +# ij_java_entity_vo_suffix = VO +# ij_java_enum_constants_wrap = off +# ij_java_extends_keyword_wrap = normal +# ij_java_extends_list_wrap = normal +# ij_java_field_annotation_wrap = split_into_lines +# ij_java_finally_on_new_line = false +# ij_java_for_brace_force = always +# ij_java_for_statement_new_line_after_left_paren = false +# ij_java_for_statement_right_paren_on_new_line = false +# ij_java_for_statement_wrap = normal +# ij_java_generate_final_locals = false +# ij_java_generate_final_parameters = false +# ij_java_if_brace_force = always +# ij_java_imports_layout = com.google.**,|,android.**,|,antenna.**,|,antlr.**,|,ar.**,|,asposewobfuscated.**,|,asquare.**,|,atg.**,|,au.**,|,beaver.**,|,bibtex.**,|,bmsi.**,|,bsh.**,|,ccl.**,|,cern.**,|,ChartDirector.**,|,checkers.**,|,com.**,|,COM.**,|,common.**,|,contribs.**,|,corejava.**,|,cryptix.**,|,cybervillains.**,|,dalvik.**,|,danbikel.**,|,de.**,|,EDU.**,|,eg.**,|,eu.**,|,examples.**,|,fat.**,|,fit.**,|,fitlibrary.**,|,fmpp.**,|,freemarker.**,|,gnu.**,|,groovy.**,|,groovyjarjarantlr.**,|,groovyjarjarasm.**,|,hak.**,|,hep.**,|,ie.**,|,imageinfo.**,|,info.**,|,it.**,|,jal.**,|,Jama.**,|,japa.**,|,japacheckers.**,|,jas.**,|,jasmin.**,|,javancss.**,|,javanet.**,|,javassist.**,|,javazoom.**,|,java_cup.**,|,jcifs.**,|,jetty.**,|,JFlex.**,|,jj2000.**,|,jline.**,|,jp.**,|,JSci.**,|,jsr166y.**,|,junit.**,|,jxl.**,|,jxxload_help.**,|,kawa.**,|,kea.**,|,libcore.**,|,libsvm.**,|,lti.**,|,memetic.**,|,mt.**,|,mx4j.**,|,net.**,|,netscape.**,|,nl.**,|,nu.**,|,oauth.**,|,ognl.**,|,opennlp.**,|,oracle.**,|,org.**,|,penn2dg.**,|,pennconverter.**,|,pl.**,|,prefuse.**,|,proguard.**,|,repackage.**,|,scm.**,|,se.**,|,serp.**,|,simple.**,|,soot.**,|,sqlj.**,|,src.**,|,ssa.**,|,sun.**,|,sunlabs.**,|,tcl.**,|,testdata.**,|,testshell.**,|,testsuite.**,|,twitter4j.**,|,uk.**,|,ViolinStrings.**,|,weka.**,|,wet.**,|,winstone.**,|,woolfel.**,|,wowza.**,|,java.**,|,javax.**,|,*,|,$* +# ij_java_indent_case_from_switch = true +# ij_java_insert_inner_class_imports = false +ij_java_insert_override_annotation = true +ij_java_keep_blank_lines_before_right_brace = 2 +ij_java_keep_blank_lines_between_package_declaration_and_header = 2 +ij_java_keep_blank_lines_in_code = 2 +ij_java_keep_blank_lines_in_declarations = 2 +# ij_java_keep_control_statement_in_one_line = false +# ij_java_keep_first_column_comment = true +# ij_java_keep_indents_on_empty_lines = false +# ij_java_keep_line_breaks = true +# ij_java_keep_multiple_expressions_in_one_line = false +ij_java_keep_simple_blocks_in_one_line = true +ij_java_keep_simple_classes_in_one_line = true +ij_java_keep_simple_lambdas_in_one_line = true +ij_java_keep_simple_methods_in_one_line = true +# ij_java_lambda_brace_style = end_of_line +# ij_java_layout_static_imports_separately = true +# ij_java_line_comment_add_space = false +# ij_java_line_comment_at_first_column = true +# ij_java_message_dd_suffix = EJB +# ij_java_message_eb_suffix = Bean +# ij_java_method_annotation_wrap = split_into_lines +# ij_java_method_brace_style = end_of_line +# ij_java_method_call_chain_wrap = off +# ij_java_method_parameters_new_line_after_left_paren = false +# ij_java_method_parameters_right_paren_on_new_line = false +# ij_java_method_parameters_wrap = off +# ij_java_modifier_list_wrap = false +ij_java_names_count_to_use_import_on_demand = 99 +# ij_java_packages_to_use_import_on_demand = java.awt.*,javax.swing.* +# ij_java_parameter_annotation_wrap = off +# ij_java_parentheses_expression_new_line_after_left_paren = false +# ij_java_parentheses_expression_right_paren_on_new_line = false +# ij_java_place_assignment_sign_on_next_line = false +# ij_java_prefer_longer_names = true +# ij_java_prefer_parameters_wrap = false +# ij_java_repeat_synchronized = true +# ij_java_replace_instanceof_and_cast = false +# ij_java_replace_null_check = true +# ij_java_replace_sum_lambda_with_method_ref = true +# ij_java_resource_list_new_line_after_left_paren = false +# ij_java_resource_list_right_paren_on_new_line = false +# ij_java_resource_list_wrap = off +# ij_java_session_dd_suffix = EJB +# ij_java_session_eb_suffix = Bean +# ij_java_session_hi_suffix = Home +# ij_java_session_lhi_prefix = Local +# ij_java_session_lhi_suffix = Home +# ij_java_session_li_prefix = Local +# ij_java_session_si_suffix = Service +# ij_java_space_after_closing_angle_bracket_in_type_argument = false +# ij_java_space_after_colon = true +# ij_java_space_after_comma = true +# ij_java_space_after_comma_in_type_arguments = true +# ij_java_space_after_for_semicolon = true +# ij_java_space_after_quest = true +# ij_java_space_after_type_cast = true +# ij_java_space_before_annotation_array_initializer_left_brace = false +# ij_java_space_before_annotation_parameter_list = false +# ij_java_space_before_array_initializer_left_brace = false +# ij_java_space_before_catch_keyword = true +# ij_java_space_before_catch_left_brace = true +# ij_java_space_before_catch_parentheses = false +# ij_java_space_before_class_left_brace = true +# ij_java_space_before_colon = true +# ij_java_space_before_colon_in_foreach = true +# ij_java_space_before_comma = false +# ij_java_space_before_do_left_brace = true +# ij_java_space_before_else_keyword = true +# ij_java_space_before_else_left_brace = true +# ij_java_space_before_finally_keyword = true +# ij_java_space_before_finally_left_brace = true +# ij_java_space_before_for_left_brace = true +# ij_java_space_before_for_parentheses = false +# ij_java_space_before_for_semicolon = false +# ij_java_space_before_if_left_brace = true +# ij_java_space_before_if_parentheses = false +# ij_java_space_before_method_call_parentheses = false +# ij_java_space_before_method_left_brace = true +# ij_java_space_before_method_parentheses = false +# ij_java_space_before_opening_angle_bracket_in_type_parameter = false +# ij_java_space_before_quest = true +# ij_java_space_before_switch_left_brace = true +# ij_java_space_before_switch_parentheses = false +# ij_java_space_before_synchronized_left_brace = true +# ij_java_space_before_synchronized_parentheses = false +# ij_java_space_before_try_left_brace = true +# ij_java_space_before_try_parentheses = false +# ij_java_space_before_type_parameter_list = false +# ij_java_space_before_while_keyword = true +# ij_java_space_before_while_left_brace = true +# ij_java_space_before_while_parentheses = false +# ij_java_space_inside_one_line_enum_braces = false +# ij_java_space_within_empty_array_initializer_braces = false +# ij_java_space_within_empty_method_call_parentheses = false +# ij_java_space_within_empty_method_parentheses = false +# ij_java_spaces_around_additive_operators = true +# ij_java_spaces_around_assignment_operators = true +# ij_java_spaces_around_bitwise_operators = true +# ij_java_spaces_around_equality_operators = true +# ij_java_spaces_around_lambda_arrow = true +# ij_java_spaces_around_logical_operators = true +# ij_java_spaces_around_method_ref_dbl_colon = false +# ij_java_spaces_around_multiplicative_operators = true +# ij_java_spaces_around_relational_operators = true +# ij_java_spaces_around_shift_operators = true +# ij_java_spaces_around_type_bounds_in_type_parameters = true +# ij_java_spaces_around_unary_operator = false +# ij_java_spaces_within_angle_brackets = false +# ij_java_spaces_within_annotation_parentheses = false +# ij_java_spaces_within_array_initializer_braces = false +# ij_java_spaces_within_braces = false +# ij_java_spaces_within_brackets = false +# ij_java_spaces_within_cast_parentheses = false +# ij_java_spaces_within_catch_parentheses = false +# ij_java_spaces_within_for_parentheses = false +# ij_java_spaces_within_if_parentheses = false +# ij_java_spaces_within_method_call_parentheses = false +# ij_java_spaces_within_method_parentheses = false +# ij_java_spaces_within_parentheses = false +# ij_java_spaces_within_switch_parentheses = false +# ij_java_spaces_within_synchronized_parentheses = false +# ij_java_spaces_within_try_parentheses = false +# ij_java_spaces_within_while_parentheses = false +# ij_java_special_else_if_treatment = true +# ij_java_subclass_name_suffix = Impl +# ij_java_ternary_operation_signs_on_next_line = true +# ij_java_ternary_operation_wrap = off +# ij_java_test_name_suffix = Test +# ij_java_throws_keyword_wrap = normal +# ij_java_throws_list_wrap = normal +# ij_java_use_external_annotations = false +# ij_java_use_fq_class_names = false +# ij_java_use_single_class_imports = true +# ij_java_variable_annotation_wrap = off +# ij_java_visibility = public +# ij_java_while_brace_force = always +# ij_java_while_on_new_line = false +# ij_java_wrap_comments = false +# ij_java_wrap_first_method_in_call_chain = false +# ij_java_wrap_long_lines = false diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..a93aa5f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ + + + +## Version Information +`Minecraft: ` +`Forge: ` +`Iron Chests: ` + +## Report Information + + +## Steps to Reproduce + + +## Crash Log + + +## Forge Log + + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8eef75cd..4d3e38c8 100755 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ build/ .classpath .project +/*.launch .gradle/ eclipse/ bin/ repo/ +out/ /run/ .settings/ #IDEA files from Gradle @@ -12,3 +14,4 @@ repo/ /*.iml /*.ipr /*.iws +/generated \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..686c97ec --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout scm + sh "rm -rf build/libs" + } + } + + stage('Build') { + steps { + sh "JAVA_HOME=${env.JDK_16} ./gradlew build -PBUILD_NUMBER=${env.BUILD_NUMBER} --no-daemon" + } + } + + stage('Archive') { + steps { + archive includes: 'build/libs/*.jar' + junit allowEmptyResults: true, testResults: 'build/test-results/**/*.xml' + } + } + + stage('Deploy') { + steps { + sh "JAVA_HOME=${env.JDK_16} ./gradlew publishMavenJavaPublicationToMavenRepository -PBUILD_NUMBER=${env.BUILD_NUMBER} -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon" + } + } + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md index 7c2d0e91..88e41a66 100755 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@ -ironchest -========= +Iron Chests [![Curseforge](http://cf.way2muchnoise.eu/full_iron-chests_downloads.svg)](https://minecraft.curseforge.com/projects/iron-chests) [![Curseforge](http://cf.way2muchnoise.eu/versions/For%20MC_iron-chests_all.svg)](https://minecraft.curseforge.com/projects/iron-chests) +=========== -Iron Chest minecraft mod +Iron Chests! A mod that adds new chests. -a GPL v3 licensed mod by cpw +Please note that the Shulker Boxes in 1.13+ have been moved to their own mod: [Iron Shulker Boxes](https://minecraft.curseforge.com/projects/iron-shulker-boxes) -Currently Maintained by ProgWML6 +For issues with the Shulker Boxes starting in 1.13+, Please report them to [Iron Shulker Boxes](https://github.com/progwml6/ironshulkerboxes) -See http://files.minecraftforge.net/IronChests2/ for downloads +## Setting up a Workspace/Compiling from Source +Note: Git MUST be installed and in the system path to use our scripts. +* Setup: Run [gradle]in the repository root: `gradlew[.bat] [eclipse] OR import build.gradle into idea` +* Build: Run [gradle]in the repository root: `gradlew[.bat] build` +* If obscure Gradle issues are found try running `gradlew clean` and `gradlew cleanCache` + +[![Discord](https://img.shields.io/discord/102860784329052160.svg?style=for-the-badge)](https://discord.gg/njGrvuh) + +If you have queries about any license or the other restrictions, please drop by our IRC channel, #progsmods on irc.esper.net diff --git a/build.gradle b/build.gradle index f9cac83c..a0c70650 100755 --- a/build.gradle +++ b/build.gradle @@ -1,159 +1,228 @@ -// This sets us up for building a forge project - you need all of these buildscript { repositories { + mavenLocal() + maven { url = 'https://maven.minecraftforge.net' } + mavenCentral() jcenter() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.24', changing: true } } -apply plugin: 'net.minecraftforge.gradle.forge' -apply plugin: 'maven' + +apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' -apply plugin: 'idea' +apply plugin: 'maven-publish' -// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target repositories { - flatDir { - name "fileRepo" - dirs "repo" + maven { + name 'DVS1 Maven FS' + url 'https://dvs1.progwml6.com/files/maven' } } -// IronChest uses git tagging to mark major versions. This sets up the project version to that version data -def versionInfo = getGitVersion() -version = "${versionInfo['IronChest.version']}" -// This is our group. I'm cpw.mods -group= "cpw.mods" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -// This is our actual project within the group. Note: FML has "fml" here. But this is ironchest. -archivesBaseName = "ironchest" +group = "com.progwml6.ironchest" + +// Mojang ships Java 16 to end users in 1.17+ instead of Java 8 in 1.16 or lower, so your mod should target Java 16. +java.toolchain.languageVersion = JavaLanguageVersion.of(16) -// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here minecraft { - version = "1.8.9-11.15.0.1689" - mappings = "stable_20" - runDir = "run" -} + mappings channel: 'official', version: mappings_version -// This wrangles the resources for the jar files- stuff like textures and languages -processResources -{ - // we're omitting the .xcf files - they're development only - exclude '**/*.xcf' - // we only want to do search/replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' - - // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version - } - - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' - } + accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') - // generate version.properties file from the git version data earlier - doLast { - def propsFile = new File(destinationDir, 'version.properties') - def properties = new Properties() - properties.putAll(versionInfo) - properties['IronChest.build.mcversion'] = project.minecraft.version - properties.store(propsFile.newWriter(), null) - } -} + runs { + client { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP,CORE' + // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP,CORE' enable if you want spam from the scanner. -// Configure an upload task. this is setup for uploading to files.minecraftforge.net. There are other examples around -uploadArchives { - repositories.mavenDeployer { + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' - dependsOn 'build' + mods { + ironchest { + source sourceSets.main + } + } - if (project.hasProperty('forgeMavenPassword')) - { - repository(url: "http://files.minecraftforge.net/maven/manage/upload") { - authentication(userName: project.getProperty('forgeMavenUser'), password: project.getProperty('forgeMavenPassword')) // the elvis operator. look it up. + //The below if statements are to add args to your gradle.properties file in user home + // (DO NOT add them directly to the gradle.properties file for this project) + // Setting the below properties allows use of your normal Minecraft account in the + // dev environment including having your skin load. Each property also has a comment + // explaining what information to set the value to/format it expects + // One thing to note is because of the caching that goes on, after changing these + // variables, you need to refresh the project and rerun genIntellijRuns/genEclipseRuns + if (project.hasProperty('mc_uuid')) { + //Your uuid without any dashes in the middle + args '--uuid', project.getProperty('mc_uuid') + } + if (project.hasProperty('mc_username')) { + //Your username/display name, this is the name that shows up in chat + // Note: This is not your email, even if you have a Mojang account + args '--username', project.getProperty('mc_username') + } + if (project.hasProperty('mc_accessToken')) { + //Your access token, you can find it in your '.minecraft/launcher_profiles.json' file + args '--accessToken', project.getProperty('mc_accessToken') } } - else - { - // local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local - repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) - } - // This is just the pom data for the maven repo - pom { - groupId = project.group - // Force the maven upload to use the - syntax preferred at files - version = "${project.minecraft.version}-${project.version}" - artifactId = project.archivesBaseName - project { - name project.archivesBaseName - packaging 'jar' - description 'IronChest' - url 'https://github.com/progwml6/IronChest' - - scm { - url 'https://github.com/progwml6/IronChest' - connection 'scm:git:git://github.com/progwml6/IronChest.git' - developerConnection 'scm:git:git@github.com:progwml6/IronChest.git' - } - issueManagement { - system 'github' - url 'https://github.com/progwml6/IronChest/issues' - } + server { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP,CORE' + // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP,CORE' enable if you want spam from the scanner. - licenses { - license { - name 'GNU Public License (GPL), Version 3.0' - url 'http://www.gnu.org/licenses/gpl-3.0.txt' - distribution 'repo' - } + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + mods { + ironchest { + source sourceSets.main } + } + } + + data { + workingDirectory project.file('run') - developers { - developer { - id 'cpw' - name 'cpw' - roles { role 'developer' } - } + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP,CORE' + // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP,CORE' enable if you want spam from the scanner. + + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + args '--mod', 'ironchest', '--all', '--output', file('src/generated/resources/') + + mods { + ironchest { + source sourceSets.main } } } } } -// This is a special task for pulling the version information from git and the environment (for BUILD_NUMBER) -def getGitVersion() -{ - def out = [:] - - // call git command. - def outStream = new ByteArrayOutputStream() - def result = exec { - executable = 'git' - args = [ 'describe', '--long', "--match=[^(jenkins)]*"] - standardOutput = outStream - } - - def fullVersion = outStream.toString().trim() - def matcher = fullVersion =~ /(\d+).(\d+)-(\d+)-(.*)/ - - def maj = matcher[0][1] - def min = matcher[0][2] - def rev = matcher[0][3] - def bn = System.getenv("PROMOTED_NUMBER") ?: System.getenv("BUILD_NUMBER") ?: "1" - - out['IronChest.build.major.number'] = maj.toString() - out['IronChest.build.minor.number'] = min.toString() - out['IronChest.build.revision.number'] = rev.toString() - out['IronChest.build.githash'] = matcher[0][4].toString() - out['IronChest.build.number' ] = bn.toString() - out['IronChest.version' ] = "${maj}.${min}.${rev}.${bn}".toString() - - return out +task buildInfo { + def cmd = "git rev-parse --short HEAD" + def proc = cmd.execute() + proc.waitFor() + if (proc.exitValue() == 0) { + ext.revision = proc.text.trim() + } else { + ext.revision = "GITBORK" + } + + if (System.getenv().BUILD_NUMBER != null) { + ext.buildNum = System.getenv().BUILD_NUMBER + } else { + ext.buildNum = "DEV.${project.buildInfo.revision}" + } +} + +version = "${minecraft_version}-${mod_version}.${project.buildInfo.buildNum}" + +sourceSets { + main { + resources { + srcDirs "src/generated/resources" + //But exclude the cache of the generated data from what gets built + exclude '.cache' + } + } +} + +dependencies { + minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version + + // compile against the JEI API but do not include it at runtime + //compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") + // at runtime, use the full JEI jar + //runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") +} + +def modsTomlSpec = copySpec{ + from(sourceSets.main.resources) { + include 'META-INF/mods.toml' + expand 'version': project.version, + 'loader_range': loader_range, + 'minecraft_range': minecraft_range, + 'forge_range': forge_range + } +} + +// need to copy into each build directory, unfortunately does not seem easy to do this automatically +def buildPaths = [ + "$rootDir/out/production/resources", // IDEA + "$rootDir/bin", // Eclipse +] + +// task to add mods.toml to all relevant folders +task replaceResources { + // copy for gradle + copy { + outputs.upToDateWhen { false } + with modsTomlSpec + into processResources.destinationDir + } + // copy for IDEs + buildPaths.each { path -> + if (new File(path).exists()) { + copy { + outputs.upToDateWhen { false } + with modsTomlSpec + into path + } + } + } +} + +processResources { + exclude 'META-INF/mods.toml' + finalizedBy replaceResources +} + +jar { + manifest { + attributes([ + "Specification-Title" : "Iron Chests", + "Specification-Vendor" : "Progwml6", + "Specification-Version" : "1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : "${version}", + "Implementation-Vendor" : "Progwml6", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +jar.finalizedBy('reobfJar') + +task sourcesJar(type: Jar) { + from sourceSets.main.allJava + classifier = 'sources' +} + +artifacts { + archives sourcesJar +} + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + artifact sourcesJar + } + } + + repositories { + if (project.hasProperty('DEPLOY_DIR')) { + maven { url DEPLOY_DIR } + } + } } diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..d930762e --- /dev/null +++ b/gradle.properties @@ -0,0 +1,22 @@ +# 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 + +# Mod Version Information +mod_version=12.0 + +# Minecraft Version Information +minecraft_version=1.17.1 +minecraft_range=[1.17.1,1.18) + +# Forge Version Information +loader_range=[33.0,) +forge_version=37.0.126 +forge_range=[37.0.126,) + +# Mappings Information +mappings_version=1.17.1 + +# Build dependencies +jei_version=1.16.4:7.6.1.65 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b5166dad..7454180f 100755 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 92011764..ffed3a25 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Nov 22 23:58:08 EST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..c53aefaa 100755 --- a/gradlew +++ b/gradlew @@ -1,79 +1,129 @@ -#!/usr/bin/env bash +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum -warn ( ) { +warn () { echo "$*" -} +} >&2 -die ( ) { +die () { echo echo "$*" echo exit 1 -} +} >&2 # 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 - ;; +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=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" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -82,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -90,75 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index aec99730..ac1b06f9 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,20 +24,23 @@ @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 Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,34 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windowz 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. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -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 set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/idea/code_style.xml b/idea/code_style.xml new file mode 100644 index 00000000..f41a69b4 --- /dev/null +++ b/idea/code_style.xml @@ -0,0 +1,59 @@ + + diff --git a/idea/inspections.xml b/idea/inspections.xml new file mode 100644 index 00000000..59b8f39d --- /dev/null +++ b/idea/inspections.xml @@ -0,0 +1,31 @@ + + + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..4ab6f512 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,19 @@ +/* + * This settings file was auto generated by the Gradle buildInit task + * by 'sunstrike' at '21/11/13 14:14' with Gradle 1.9 + * + * The settings file is used to specify which projects to include in your build. + * In a single project build this file can be empty or even removed. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user guide at http://gradle.org/docs/1.9/userguide/multi_project_builds.html + */ + +/* +// To declare projects as part of a multi-project build use the 'include' method +include 'shared' +include 'api' +include 'services:webservice' +*/ + +rootProject.name = 'ironchest' diff --git a/src/api/java/invtweaks/api/container/ChestContainer.java b/src/api/java/invtweaks/api/container/ChestContainer.java old mode 100755 new mode 100644 index dc273777..e148569b --- a/src/api/java/invtweaks/api/container/ChestContainer.java +++ b/src/api/java/invtweaks/api/container/ChestContainer.java @@ -6,12 +6,13 @@ import java.lang.annotation.Target; /** - * A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting + * A marker for containers that have a chest-like persistent storage component. Enables the Inventory Tweaks sorting * buttons for this container. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) -public @interface ChestContainer { +public @interface ChestContainer +{ // Set to true if the Inventory Tweaks sorting buttons should be shown for this container. boolean showButtons() default true; @@ -26,13 +27,15 @@ // Signature int func() @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) - public @interface RowSizeCallback { + @interface RowSizeCallback + { } // Annotation for method to get size of a chest row if it is not a fixed size for this container class - // Signature int func() + // Signature boolean func() @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) - public @interface IsLargeCallback { + @interface IsLargeCallback + { } -} \ 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..3fb754cf --- /dev/null +++ b/src/generated/resources/.cache/cache @@ -0,0 +1,44 @@ +7296cff6a6eca7b425e197d3fb7888e6fa3cd5dd data/ironchest/advancements/recipes/ironchest/chests/copper_iron_chest.json +365d1d3c70e95c535001aa21e2f0d28480c976e2 data/ironchest/advancements/recipes/ironchest/chests/diamond_crystal_chest.json +14cfaa8fa7e949d583f5f0cd1babf9bc572d52f1 data/ironchest/advancements/recipes/ironchest/chests/diamond_obsidian_chest.json +82f46e3026d29292107f3508efe9f51ccd04dd9f data/ironchest/advancements/recipes/ironchest/chests/gold_diamond_chest.json +b5137f5fe7c01b7d17e8fdb6e3566259495b6e9e data/ironchest/advancements/recipes/ironchest/chests/iron_gold_chest.json +7d082e5fba21b16e47a2b18a056c3dd5f23446f7 data/ironchest/advancements/recipes/ironchest/chests/trapped_copper_chest.json +142c7602ee97d7ff8d90be8a079c9194399823ba data/ironchest/advancements/recipes/ironchest/chests/trapped_crystal_chest.json +647b32ea931ab295e543ff2c9764c54f8d7c60bc data/ironchest/advancements/recipes/ironchest/chests/trapped_diamond_chest.json +face9559d8ebe33ba328907c7972008500a0e479 data/ironchest/advancements/recipes/ironchest/chests/trapped_dirt_chest.json +5daf3624699118447c3e0a5301d2867e1316d496 data/ironchest/advancements/recipes/ironchest/chests/trapped_gold_chest.json +672915e6909fab99e26a279cc0fb602194ee0fbd data/ironchest/advancements/recipes/ironchest/chests/trapped_iron_chest.json +a18efb9a37526e310f8fd0c416afe5b9e0cdb60a data/ironchest/advancements/recipes/ironchest/chests/trapped_obsidian_chest.json +9af9bbe7112085d5bf3506ff5382bca94583ba87 data/ironchest/advancements/recipes/ironchest/chests/vanilla_copper_chest.json +fe5a597181eb84fdb45abedc4acc1e3851408fd5 data/ironchest/advancements/recipes/ironchest/chests/vanilla_dirt_chest.json +2b35db8b04b0d148e17560f71ca159acdda5d44c data/ironchest/advancements/recipes/ironchest/chests/vanilla_iron_chest.json +5f8f57815f58b45b193e9a660a13824ca545ad7b data/ironchest/advancements/recipes/ironchest/upgrades/copper_to_iron_chest_upgrade.json +321e75477afceb6f187f15cf1f7568c6d31d6c87 data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_crystal_chest_upgrade.json +17ed7dbb2c69090dacd0efea29dbaf949a4e876d data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_obsidian_chest_upgrade.json +13c40784d2a492f1ea186962d08fc2fb74250cba data/ironchest/advancements/recipes/ironchest/upgrades/gold_to_diamond_chest_upgrade.json +9a594bfd16844d98c31e3b15932142d335cff104 data/ironchest/advancements/recipes/ironchest/upgrades/iron_to_gold_chest_upgrade.json +160649754eab1cf0e5c51bb0fb86e7da3591aa04 data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_copper_chest_upgrade.json +6045f50aafba06668e0f221d3e7d62827a3ed368 data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_iron_chest_upgrade.json +db1c86a602b40793abc52cebf70fad24cf6409d9 data/ironchest/recipes/chests/copper_iron_chest.json +5b6d438390722b031bb97e4c5501449c18c4bbca data/ironchest/recipes/chests/diamond_crystal_chest.json +9f141ad7e75e7ac70b175129c058180da5e04ab7 data/ironchest/recipes/chests/diamond_obsidian_chest.json +00cad996bebebe268e2e0a4c59c024127c6f4a06 data/ironchest/recipes/chests/gold_diamond_chest.json +401d6ab7ffb4e815dc1a6562dd70bc7bd1f6d524 data/ironchest/recipes/chests/iron_gold_chest.json +75b39983c0c9f2ca8218d92944d7a7f4690836cc data/ironchest/recipes/chests/trapped_copper_chest.json +bea47276cee81c561d994e74676c8c395d2beb16 data/ironchest/recipes/chests/trapped_crystal_chest.json +455756f75eb3c1461f8b9b18685ca9c9b85b7715 data/ironchest/recipes/chests/trapped_diamond_chest.json +1025e3d03c72c912241eac954cd1fe73b3afe32d data/ironchest/recipes/chests/trapped_dirt_chest.json +be5121a75023e6b3498c1f5f70a10d0018462933 data/ironchest/recipes/chests/trapped_gold_chest.json +66d6b68613ec306bde252f802d46373c4df540c9 data/ironchest/recipes/chests/trapped_iron_chest.json +20846ca266bf0374f5abe21c4957566f5e065b6e data/ironchest/recipes/chests/trapped_obsidian_chest.json +c4ce3a2d83ee91bc30b7f88fef054b6331f71d8d data/ironchest/recipes/chests/vanilla_copper_chest.json +6a2a1c0af03d5d3ea12ee4ee2f9ccebbb4f86196 data/ironchest/recipes/chests/vanilla_dirt_chest.json +12878399ae3ea231cd4b73f5883cd741938bbd5f data/ironchest/recipes/chests/vanilla_iron_chest.json +4511348163faf1009f48d5f7fa0f158aab35a971 data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json +780bbb21db7e8c0ca51e366eb1ef9846b046a612 data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json +8f49486d68aa7f56c740d8e9008db5fd2f53fd6e data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json +793e25f4ae9a93636292036ceb9b0aaa821d299b data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json +1b70eef2a303cf31300a5a5bc20780f9cea7e444 data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json +058c4081d18ddcff952f218a1e1e31ea1c26fa04 data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json +1098d6ebd2e6e1065324fd6314481fe40df132e7 data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/copper_iron_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/copper_iron_chest.json new file mode 100644 index 00000000..9b6345bf --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/copper_iron_chest.json @@ -0,0 +1,47 @@ +{ + "advancements": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "advancement": { + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/copper_iron_chest" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/copper_iron_chest" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_crystal_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_crystal_chest.json new file mode 100644 index 00000000..8c0c138b --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_crystal_chest.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/diamond_crystal_chest" + ] + }, + "criteria": { + "has_glass": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/diamond_crystal_chest" + } + } + }, + "requirements": [ + [ + "has_glass", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_obsidian_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_obsidian_chest.json new file mode 100644 index 00000000..4ca5fcec --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/diamond_obsidian_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/diamond_obsidian_chest" + ] + }, + "criteria": { + "has_obsidian": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:obsidian" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/diamond_obsidian_chest" + } + } + }, + "requirements": [ + [ + "has_obsidian", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/gold_diamond_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/gold_diamond_chest.json new file mode 100644 index 00000000..d1ad345c --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/gold_diamond_chest.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/gold_diamond_chest" + ] + }, + "criteria": { + "has_diamonds": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:gems/diamond" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/gold_diamond_chest" + } + } + }, + "requirements": [ + [ + "has_diamonds", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/iron_gold_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/iron_gold_chest.json new file mode 100644 index 00000000..764165a1 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/iron_gold_chest.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/iron_gold_chest" + ] + }, + "criteria": { + "has_gold_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/gold" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/iron_gold_chest" + } + } + }, + "requirements": [ + [ + "has_gold_ingot", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_copper_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_copper_chest.json new file mode 100644 index 00000000..6884468c --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_copper_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_copper_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_copper_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_crystal_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_crystal_chest.json new file mode 100644 index 00000000..62a6388f --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_crystal_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_crystal_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_crystal_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_diamond_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_diamond_chest.json new file mode 100644 index 00000000..b2d1960a --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_diamond_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_diamond_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_diamond_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_dirt_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_dirt_chest.json new file mode 100644 index 00000000..0e08fe8d --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_dirt_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_dirt_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_dirt_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_gold_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_gold_chest.json new file mode 100644 index 00000000..361f2c00 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_gold_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_gold_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_gold_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_iron_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_iron_chest.json new file mode 100644 index 00000000..319b25b8 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_iron_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_iron_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_iron_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_obsidian_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_obsidian_chest.json new file mode 100644 index 00000000..94f0cf3b --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/trapped_obsidian_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/trapped_obsidian_chest" + ] + }, + "criteria": { + "has_tripwire_hook": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:tripwire_hook" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/trapped_obsidian_chest" + } + } + }, + "requirements": [ + [ + "has_tripwire_hook", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_copper_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_copper_chest.json new file mode 100644 index 00000000..76653d0a --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_copper_chest.json @@ -0,0 +1,47 @@ +{ + "advancements": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "advancement": { + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/vanilla_copper_chest" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/copper" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/vanilla_copper_chest" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_dirt_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_dirt_chest.json new file mode 100644 index 00000000..449660e0 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_dirt_chest.json @@ -0,0 +1,34 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/vanilla_dirt_chest" + ] + }, + "criteria": { + "has_iron_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "items": [ + "minecraft:dirt" + ] + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/vanilla_dirt_chest" + } + } + }, + "requirements": [ + [ + "has_iron_ingot", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_iron_chest.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_iron_chest.json new file mode 100644 index 00000000..33a91da1 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/chests/vanilla_iron_chest.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:chests/vanilla_iron_chest" + ] + }, + "criteria": { + "has_iron_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:chests/vanilla_iron_chest" + } + } + }, + "requirements": [ + [ + "has_iron_ingot", + "has_the_recipe" + ] + ] +} diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/copper_to_iron_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/copper_to_iron_chest_upgrade.json new file mode 100644 index 00000000..ee4d0bf1 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/copper_to_iron_chest_upgrade.json @@ -0,0 +1,47 @@ +{ + "advancements": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "advancement": { + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/copper_to_iron_chest_upgrade" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/copper_to_iron_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_crystal_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_crystal_chest_upgrade.json new file mode 100644 index 00000000..55bff4c4 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_crystal_chest_upgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/diamond_to_crystal_chest_upgrade" + ] + }, + "criteria": { + "has_glass": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/diamond_to_crystal_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_glass", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_obsidian_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_obsidian_chest_upgrade.json new file mode 100644 index 00000000..24cabae0 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/diamond_to_obsidian_chest_upgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/diamond_to_obsidian_chest_upgrade" + ] + }, + "criteria": { + "has_glass": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/diamond_to_obsidian_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_glass", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/gold_to_diamond_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/gold_to_diamond_chest_upgrade.json new file mode 100644 index 00000000..9a4c89b7 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/gold_to_diamond_chest_upgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/gold_to_diamond_chest_upgrade" + ] + }, + "criteria": { + "has_glass": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:glass" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/gold_to_diamond_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_glass", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/iron_to_gold_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/iron_to_gold_chest_upgrade.json new file mode 100644 index 00000000..0afe9f6b --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/iron_to_gold_chest_upgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/iron_to_gold_chest_upgrade" + ] + }, + "criteria": { + "has_iron_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/iron_to_gold_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_iron_ingot", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_copper_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_copper_chest_upgrade.json new file mode 100644 index 00000000..47d88c78 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_copper_chest_upgrade.json @@ -0,0 +1,47 @@ +{ + "advancements": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "advancement": { + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/wood_to_copper_chest_upgrade" + ] + }, + "criteria": { + "has_item": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "minecraft:planks" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/wood_to_copper_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_item", + "has_the_recipe" + ] + ] + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_iron_chest_upgrade.json b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_iron_chest_upgrade.json new file mode 100644 index 00000000..b5874878 --- /dev/null +++ b/src/generated/resources/data/ironchest/advancements/recipes/ironchest/upgrades/wood_to_iron_chest_upgrade.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "rewards": { + "recipes": [ + "ironchest:upgrades/wood_to_iron_chest_upgrade" + ] + }, + "criteria": { + "has_iron_ingot": { + "trigger": "minecraft:inventory_changed", + "conditions": { + "items": [ + { + "tag": "forge:ingots/iron" + } + ] + } + }, + "has_the_recipe": { + "trigger": "minecraft:recipe_unlocked", + "conditions": { + "recipe": "ironchest:upgrades/wood_to_iron_chest_upgrade" + } + } + }, + "requirements": [ + [ + "has_iron_ingot", + "has_the_recipe" + ] + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/copper_iron_chest.json b/src/generated/resources/data/ironchest/recipes/chests/copper_iron_chest.json new file mode 100644 index 00000000..48c691c0 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/copper_iron_chest.json @@ -0,0 +1,38 @@ +{ + "type": "forge:conditional", + "recipes": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "recipe": { + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "item": "ironchest:copper_chest" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:iron_chest" + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json b/src/generated/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json new file mode 100644 index 00000000..ecaed6f4 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GSG", + "GGG" + ], + "key": { + "G": { + "tag": "forge:glass" + }, + "S": { + "item": "ironchest:diamond_chest" + } + }, + "result": { + "item": "ironchest:crystal_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json b/src/generated/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json new file mode 100644 index 00000000..8e218b31 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "item": "minecraft:obsidian" + }, + "S": { + "item": "ironchest:diamond_chest" + } + }, + "result": { + "item": "ironchest:obsidian_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/gold_diamond_chest.json b/src/generated/resources/data/ironchest/recipes/chests/gold_diamond_chest.json new file mode 100644 index 00000000..62fbeedb --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/gold_diamond_chest.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "MSM", + "GGG" + ], + "key": { + "M": { + "tag": "forge:gems/diamond" + }, + "S": { + "item": "ironchest:gold_chest" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:diamond_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/iron_gold_chest.json b/src/generated/resources/data/ironchest/recipes/chests/iron_gold_chest.json new file mode 100644 index 00000000..3e5f00a2 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/iron_gold_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/gold" + }, + "S": { + "item": "ironchest:iron_chest" + } + }, + "result": { + "item": "ironchest:gold_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_copper_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_copper_chest.json new file mode 100644 index 00000000..58a4fdcc --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_copper_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:copper_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_copper_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_crystal_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_crystal_chest.json new file mode 100644 index 00000000..a4027a1c --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_crystal_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:crystal_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_crystal_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_diamond_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_diamond_chest.json new file mode 100644 index 00000000..012c696c --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_diamond_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:diamond_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_diamond_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_dirt_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_dirt_chest.json new file mode 100644 index 00000000..195f1e3a --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_dirt_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:dirt_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_dirt_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_gold_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_gold_chest.json new file mode 100644 index 00000000..d7d92c6e --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_gold_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:gold_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_gold_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_iron_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_iron_chest.json new file mode 100644 index 00000000..199b0004 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_iron_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:iron_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_iron_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/trapped_obsidian_chest.json b/src/generated/resources/data/ironchest/recipes/chests/trapped_obsidian_chest.json new file mode 100644 index 00000000..3d55c781 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/trapped_obsidian_chest.json @@ -0,0 +1,14 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "ironchest:obsidian_chest" + }, + { + "item": "minecraft:tripwire_hook" + } + ], + "result": { + "item": "ironchest:trapped_obsidian_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json b/src/generated/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json new file mode 100644 index 00000000..34144308 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json @@ -0,0 +1,35 @@ +{ + "type": "forge:conditional", + "recipes": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "recipe": { + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/copper" + }, + "S": { + "tag": "forge:chests/wooden" + } + }, + "result": { + "item": "ironchest:copper_chest" + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json b/src/generated/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json new file mode 100644 index 00000000..0e730eeb --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": [ + { + "item": "minecraft:dirt" + }, + { + "item": "minecraft:coarse_dirt" + }, + { + "item": "minecraft:podzol" + } + ], + "S": { + "tag": "forge:chests/wooden" + } + }, + "result": { + "item": "ironchest:dirt_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json b/src/generated/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json new file mode 100644 index 00000000..c10a999d --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "tag": "forge:chests/wooden" + } + }, + "result": { + "item": "ironchest:iron_chest" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json new file mode 100644 index 00000000..535c42b8 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json @@ -0,0 +1,38 @@ +{ + "type": "forge:conditional", + "recipes": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "recipe": { + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "tag": "forge:ingots/copper" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:copper_to_iron_chest_upgrade" + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json new file mode 100644 index 00000000..7a3f770d --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GMG", + "GGG" + ], + "key": { + "M": { + "item": "minecraft:obsidian" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:diamond_to_crystal_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json new file mode 100644 index 00000000..960d7c49 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MGM", + "MMM" + ], + "key": { + "M": { + "item": "minecraft:obsidian" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:diamond_to_obsidian_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json new file mode 100644 index 00000000..a4395bed --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json @@ -0,0 +1,22 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "MSM", + "GGG" + ], + "key": { + "M": { + "tag": "forge:gems/diamond" + }, + "S": { + "tag": "forge:ingots/gold" + }, + "G": { + "tag": "forge:glass" + } + }, + "result": { + "item": "ironchest:gold_to_diamond_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json new file mode 100644 index 00000000..918ed2f0 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GIG", + "GGG" + ], + "key": { + "I": { + "tag": "forge:ingots/iron" + }, + "G": { + "tag": "forge:ingots/gold" + } + }, + "result": { + "item": "ironchest:iron_to_gold_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json new file mode 100644 index 00000000..70e4b9b1 --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json @@ -0,0 +1,35 @@ +{ + "type": "forge:conditional", + "recipes": [ + { + "conditions": [ + { + "value": { + "tag": "forge:ingots/copper", + "type": "forge:tag_empty" + }, + "type": "forge:not" + } + ], + "recipe": { + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/copper" + }, + "S": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "ironchest:wood_to_copper_chest_upgrade" + } + } + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json b/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json new file mode 100644 index 00000000..95dc28dc --- /dev/null +++ b/src/generated/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MPM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "P": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "ironchest:wood_to_iron_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/IronChests.java b/src/main/java/com/progwml6/ironchest/IronChests.java new file mode 100644 index 00000000..d1c87362 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/IronChests.java @@ -0,0 +1,99 @@ +package com.progwml6.ironchest; + +import com.progwml6.ironchest.client.screen.IronChestScreen; +import com.progwml6.ironchest.client.render.IronChestRenderer; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.data.IronChestsRecipeProvider; +import com.progwml6.ironchest.common.inventory.IronChestsContainerTypes; +import com.progwml6.ironchest.common.item.IronChestsItems; +import com.progwml6.ironchest.common.network.IronChestNetwork; +import net.minecraft.client.gui.screens.MenuScreens; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; +import net.minecraft.data.DataGenerator; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import net.minecraftforge.forge.event.lifecycle.GatherDataEvent; + +@Mod(IronChests.MOD_ID) +public class IronChests { + + public static final String MOD_ID = "ironchest"; + + public static final CreativeModeTab IRONCHESTS_ITEM_GROUP = (new CreativeModeTab("ironchest") { + @Override + @OnlyIn(Dist.CLIENT) + public ItemStack makeIcon() { + return new ItemStack(IronChestsBlocks.IRON_CHEST.get()); + } + }); + + public IronChests() { + IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus(); + + // General mod setup + modBus.addListener(this::setup); + modBus.addListener(this::gatherData); + + DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + // Client setup + modBus.addListener(this::setupClient); + }); + + IronChestNetwork.setup(); + + // Registry objects + IronChestsBlocks.BLOCKS.register(modBus); + IronChestsItems.ITEMS.register(modBus); + IronChestsBlockEntityTypes.BLOCK_ENTITIES.register(modBus); + IronChestsContainerTypes.CONTAINERS.register(modBus); + } + + @OnlyIn(Dist.CLIENT) + private void setupClient(final FMLClientSetupEvent event) { + MenuScreens.register(IronChestsContainerTypes.IRON_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.GOLD_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.DIAMOND_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.CRYSTAL_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.COPPER_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), IronChestScreen::new); + MenuScreens.register(IronChestsContainerTypes.DIRT_CHEST.get(), IronChestScreen::new); + + BlockEntityRenderers.register(IronChestsBlockEntityTypes.IRON_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.GOLD_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.DIAMOND_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.COPPER_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.CRYSTAL_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.OBSIDIAN_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.DIRT_CHEST.get(), IronChestRenderer::new); + + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_IRON_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_GOLD_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_DIAMOND_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_COPPER_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_CRYSTAL_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_OBSIDIAN_CHEST.get(), IronChestRenderer::new); + BlockEntityRenderers.register(IronChestsBlockEntityTypes.TRAPPED_DIRT_CHEST.get(), IronChestRenderer::new); + } + + private void setup(final FMLCommonSetupEvent event) { + + } + + private void gatherData(GatherDataEvent event) { + DataGenerator datagenerator = event.getGenerator(); + + if (event.includeServer()) { + datagenerator.addProvider(new IronChestsRecipeProvider(datagenerator)); + } + } + +} diff --git a/src/main/java/com/progwml6/ironchest/IronChestsClientEvents.java b/src/main/java/com/progwml6/ironchest/IronChestsClientEvents.java new file mode 100644 index 00000000..86ce645e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/IronChestsClientEvents.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest; + +import com.progwml6.ironchest.client.render.IronChestRenderer; +import net.minecraft.client.model.geom.ModelLayerLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.EntityRenderersEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = IronChests.MOD_ID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) +public class IronChestsClientEvents { + + public static final ModelLayerLocation IRON_CHEST = new ModelLayerLocation(new ResourceLocation(IronChests.MOD_ID, "iron_chest"), "main"); + + @SubscribeEvent + public static void layerDefinitions(EntityRenderersEvent.RegisterLayerDefinitions event) { + event.registerLayerDefinition(IRON_CHEST, IronChestRenderer::createBodyLayer); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/model/IronChestsModels.java b/src/main/java/com/progwml6/ironchest/client/model/IronChestsModels.java new file mode 100644 index 00000000..f4d94822 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/model/IronChestsModels.java @@ -0,0 +1,80 @@ +package com.progwml6.ironchest.client.model; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.TextureStitchEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +@Mod.EventBusSubscriber(modid = IronChests.MOD_ID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) +public class IronChestsModels { + + public static final ResourceLocation IRON_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/iron_chest"); + public static final ResourceLocation GOLD_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/gold_chest"); + public static final ResourceLocation DIAMOND_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/diamond_chest"); + public static final ResourceLocation COPPER_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/copper_chest"); + public static final ResourceLocation CRYSTAL_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/crystal_chest"); + public static final ResourceLocation OBSIDIAN_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/obsidian_chest"); + public static final ResourceLocation DIRT_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/dirt_chest"); + public static final ResourceLocation VANILLA_CHEST_LOCATION = new ResourceLocation("entity/chest/normal"); + + public static final ResourceLocation TRAPPED_IRON_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_iron_chest"); + public static final ResourceLocation TRAPPED_GOLD_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_gold_chest"); + public static final ResourceLocation TRAPPED_DIAMOND_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_diamond_chest"); + public static final ResourceLocation TRAPPED_COPPER_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_copper_chest"); + public static final ResourceLocation TRAPPED_CRYSTAL_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_crystal_chest"); + public static final ResourceLocation TRAPPED_OBSIDIAN_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_obsidian_chest"); + public static final ResourceLocation TRAPPED_DIRT_CHEST_LOCATION = new ResourceLocation(IronChests.MOD_ID, "model/trapped_dirt_chest"); + public static final ResourceLocation TRAPPED_VANILLA_CHEST_LOCATION = new ResourceLocation("entity/chest/trapped"); + + public static ResourceLocation chooseChestTexture(IronChestsTypes type, boolean trapped) { + if (trapped) + return switch (type) { + case IRON -> TRAPPED_IRON_CHEST_LOCATION; + case GOLD -> TRAPPED_GOLD_CHEST_LOCATION; + case DIAMOND -> TRAPPED_DIAMOND_CHEST_LOCATION; + case COPPER -> TRAPPED_COPPER_CHEST_LOCATION; + case CRYSTAL -> TRAPPED_CRYSTAL_CHEST_LOCATION; + case OBSIDIAN -> TRAPPED_OBSIDIAN_CHEST_LOCATION; + case DIRT -> TRAPPED_DIRT_CHEST_LOCATION; + default -> TRAPPED_VANILLA_CHEST_LOCATION; + }; + else + return switch (type) { + case IRON -> IRON_CHEST_LOCATION; + case GOLD -> GOLD_CHEST_LOCATION; + case DIAMOND -> DIAMOND_CHEST_LOCATION; + case COPPER -> COPPER_CHEST_LOCATION; + case CRYSTAL -> CRYSTAL_CHEST_LOCATION; + case OBSIDIAN -> OBSIDIAN_CHEST_LOCATION; + case DIRT -> DIRT_CHEST_LOCATION; + default -> VANILLA_CHEST_LOCATION; + }; + } + + @SubscribeEvent + public static void onStitch(TextureStitchEvent.Pre event) { + if (!event.getMap().location().equals(Sheets.CHEST_SHEET)) { + return; + } + + event.addSprite(IRON_CHEST_LOCATION); + event.addSprite(GOLD_CHEST_LOCATION); + event.addSprite(DIAMOND_CHEST_LOCATION); + event.addSprite(COPPER_CHEST_LOCATION); + event.addSprite(CRYSTAL_CHEST_LOCATION); + event.addSprite(OBSIDIAN_CHEST_LOCATION); + event.addSprite(DIRT_CHEST_LOCATION); + + event.addSprite(TRAPPED_IRON_CHEST_LOCATION); + event.addSprite(TRAPPED_GOLD_CHEST_LOCATION); + event.addSprite(TRAPPED_DIAMOND_CHEST_LOCATION); + event.addSprite(TRAPPED_COPPER_CHEST_LOCATION); + event.addSprite(TRAPPED_CRYSTAL_CHEST_LOCATION); + event.addSprite(TRAPPED_OBSIDIAN_CHEST_LOCATION); + event.addSprite(TRAPPED_DIRT_CHEST_LOCATION); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/model/inventory/IronChestItemStackRenderer.java b/src/main/java/com/progwml6/ironchest/client/model/inventory/IronChestItemStackRenderer.java new file mode 100644 index 00000000..bdcd5a75 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/model/inventory/IronChestItemStackRenderer.java @@ -0,0 +1,33 @@ +package com.progwml6.ironchest.client.model.inventory; + +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.model.geom.EntityModelSet; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import java.util.function.Supplier; + +@OnlyIn(Dist.CLIENT) +public class IronChestItemStackRenderer extends BlockEntityWithoutLevelRenderer { + + private final Supplier te; + private final BlockEntityRenderDispatcher blockEntityRenderDispatcher; + + public IronChestItemStackRenderer(BlockEntityRenderDispatcher renderDispatcher, EntityModelSet modelSet, Supplier te) { + super(renderDispatcher, modelSet); + + this.te = te; + this.blockEntityRenderDispatcher = renderDispatcher; + } + + @Override + public void renderByItem(ItemStack itemStackIn, ItemTransforms.TransformType transformType, PoseStack matrixStackIn, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) { + this.blockEntityRenderDispatcher.renderItem(this.te.get(), matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/model/inventory/ModelItem.java b/src/main/java/com/progwml6/ironchest/client/model/inventory/ModelItem.java new file mode 100644 index 00000000..e676db07 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/model/inventory/ModelItem.java @@ -0,0 +1,59 @@ +package com.progwml6.ironchest.client.model.inventory; + +import com.mojang.math.Vector3f; + +public class ModelItem { + private final Vector3f center; + private final float size; + + /** Item center location in percentages, lazy loaded */ + private Vector3f centerScaled; + /** Item size in percentages, lazy loaded */ + private Float sizeScaled; + + public ModelItem(Vector3f center, float size) { + this.center = center; + this.size = size; + } + + /** + * Gets the center for rendering this item, scaled for renderer + * @return Scaled center + */ + public Vector3f getCenterScaled() { + if (centerScaled == null) { + centerScaled = center.copy(); + centerScaled.mul(1f / 16f); + } + + return centerScaled; + } + + /** + * Gets the size to render this item, scaled for the renderer + * @return Size scaled + */ + public float getSizeScaled() { + if (sizeScaled == null) { + sizeScaled = size / 16f; + } + + return sizeScaled; + } + + /** + * Gets the center for rendering this item + * @return Center + */ + public Vector3f getCenter() { + return center; + } + + /** + * Gets the size to render this item + * @return Size + */ + public float getSize() { + return size; + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/model/inventory/package-info.java b/src/main/java/com/progwml6/ironchest/client/model/inventory/package-info.java new file mode 100644 index 00000000..294d1a38 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/model/inventory/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.client.model.inventory; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/client/model/package-info.java b/src/main/java/com/progwml6/ironchest/client/model/package-info.java new file mode 100644 index 00000000..65ddbb94 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/model/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.client.model; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/client/package-info.java b/src/main/java/com/progwml6/ironchest/client/package-info.java new file mode 100644 index 00000000..cda3c2bf --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.client; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/client/render/IronChestRenderer.java b/src/main/java/com/progwml6/ironchest/client/render/IronChestRenderer.java new file mode 100644 index 00000000..126ca4e1 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/render/IronChestRenderer.java @@ -0,0 +1,186 @@ +package com.progwml6.ironchest.client.render; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.progwml6.ironchest.IronChestsClientEvents; +import com.progwml6.ironchest.client.model.IronChestsModels; +import com.progwml6.ironchest.client.model.inventory.ModelItem; +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.ICrystalChest; +import com.progwml6.ironchest.common.block.trapped.entity.AbstractTrappedIronChestBlockEntity; +import it.unimi.dsi.fastutil.floats.Float2FloatFunction; +import it.unimi.dsi.fastutil.ints.Int2IntFunction; +import net.minecraft.client.model.geom.PartPose; +import net.minecraft.client.model.geom.builders.CubeListBuilder; +import net.minecraft.client.model.geom.builders.LayerDefinition; +import net.minecraft.client.model.geom.builders.MeshDefinition; +import net.minecraft.client.model.geom.builders.PartDefinition; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderDispatcher; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.client.renderer.texture.OverlayTexture; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.Sheets; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.model.geom.ModelPart; +import net.minecraft.client.resources.model.Material; +import net.minecraft.client.renderer.blockentity.BrightnessCombiner; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.LidBlockEntity; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.DoubleBlockCombiner; +import net.minecraft.core.Direction; +import net.minecraft.world.phys.Vec3; +import com.mojang.math.Vector3f; +import net.minecraft.world.level.Level; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import java.util.Arrays; +import java.util.List; + +@OnlyIn(Dist.CLIENT) +public class IronChestRenderer implements BlockEntityRenderer { + + private final ModelPart lid; + private final ModelPart bottom; + private final ModelPart lock; + + private final BlockEntityRenderDispatcher renderer; + + private static final List MODEL_ITEMS = Arrays.asList( + new ModelItem(new Vector3f(0.3F, 0.45F, 0.3F), 3.0F), + new ModelItem(new Vector3f(0.7F, 0.45F, 0.3F), 3.0F), + new ModelItem(new Vector3f(0.3F, 0.45F, 0.7F), 3.0F), + new ModelItem(new Vector3f(0.7F, 0.45F, 0.7F), 3.0F), + new ModelItem(new Vector3f(0.3F, 0.1F, 0.3F), 3.0F), + new ModelItem(new Vector3f(0.7F, 0.1F, 0.3F), 3.0F), + new ModelItem(new Vector3f(0.3F, 0.1F, 0.7F), 3.0F), + new ModelItem(new Vector3f(0.7F, 0.1F, 0.7F), 3.0F), + new ModelItem(new Vector3f(0.5F, 0.32F, 0.5F), 3.0F) + ); + + public IronChestRenderer(BlockEntityRendererProvider.Context context) { + ModelPart modelPart = context.bakeLayer(IronChestsClientEvents.IRON_CHEST); + + this.renderer = context.getBlockEntityRenderDispatcher(); + this.bottom = modelPart.getChild("iron_bottom"); + this.lid = modelPart.getChild("iron_lid"); + this.lock = modelPart.getChild("iron_lock"); + } + + public static LayerDefinition createBodyLayer() { + MeshDefinition meshDefinition = new MeshDefinition(); + PartDefinition partDefinition = meshDefinition.getRoot(); + + partDefinition.addOrReplaceChild("iron_bottom", CubeListBuilder.create().texOffs(0, 19).addBox(1.0F, 0.0F, 1.0F, 14.0F, 10.0F, 14.0F), PartPose.ZERO); + partDefinition.addOrReplaceChild("iron_lid", CubeListBuilder.create().texOffs(0, 0).addBox(1.0F, 0.0F, 0.0F, 14.0F, 5.0F, 14.0F), PartPose.offset(0.0F, 9.0F, 1.0F)); + partDefinition.addOrReplaceChild("iron_lock", CubeListBuilder.create().texOffs(0, 0).addBox(7.0F, -1.0F, 15.0F, 2.0F, 4.0F, 1.0F), PartPose.offset(0.0F, 8.0F, 0.0F)); + + return LayerDefinition.create(meshDefinition, 64, 64); + } + + @Override + public void render(T tileEntityIn, float partialTicks, PoseStack poseStack, MultiBufferSource bufferSource, int combinedLightIn, int combinedOverlayIn) { + AbstractIronChestBlockEntity tileEntity = (AbstractIronChestBlockEntity) tileEntityIn; + + Level level = tileEntity.getLevel(); + boolean useTileEntityBlockState = level != null; + + BlockState blockState = useTileEntityBlockState ? tileEntity.getBlockState() : (BlockState) tileEntity.getBlockToUse().defaultBlockState().setValue(AbstractIronChestBlock.FACING, Direction.SOUTH); + Block block = blockState.getBlock(); + IronChestsTypes chestType = IronChestsTypes.IRON; + IronChestsTypes actualType = AbstractIronChestBlock.getTypeFromBlock(block); + + if (actualType != null) { + chestType = actualType; + } + + if (block instanceof AbstractIronChestBlock abstractChestBlock) { + poseStack.pushPose(); + + float f = blockState.getValue(AbstractIronChestBlock.FACING).toYRot(); + + poseStack.translate(0.5D, 0.5D, 0.5D); + poseStack.mulPose(Vector3f.YP.rotationDegrees(-f)); + poseStack.translate(-0.5D, -0.5D, -0.5D); + + DoubleBlockCombiner.NeighborCombineResult neighborCombineResult; + + if (useTileEntityBlockState) { + neighborCombineResult = abstractChestBlock.combine(blockState, level, tileEntityIn.getBlockPos(), true); + } else { + neighborCombineResult = DoubleBlockCombiner.Combiner::acceptNone; + } + + float openness = neighborCombineResult.apply(AbstractIronChestBlock.opennessCombiner(tileEntity)).get(partialTicks); + openness = 1.0F - openness; + openness = 1.0F - openness * openness * openness; + + int brightness = neighborCombineResult.apply(new BrightnessCombiner<>()).applyAsInt(combinedLightIn); + + boolean trapped = tileEntityIn instanceof AbstractTrappedIronChestBlockEntity; + + Material material = new Material(Sheets.CHEST_SHEET, IronChestsModels.chooseChestTexture(chestType, trapped)); + + VertexConsumer vertexConsumer = material.buffer(bufferSource, RenderType::entityCutout); + + this.render(poseStack, vertexConsumer, this.lid, this.lock, this.bottom, openness, brightness, combinedOverlayIn); + + poseStack.popPose(); + + if (chestType.isTransparent() && tileEntity instanceof ICrystalChest crystalChest && Vec3.atCenterOf(tileEntityIn.getBlockPos()).closerThan(this.renderer.camera.getPosition(), 128d)) { + float rotation = (float) (360D * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) - partialTicks; + + for (int j = 0; j < MODEL_ITEMS.size() - 1; j++) { + renderItem(poseStack, bufferSource, crystalChest.getTopItems().get(j), MODEL_ITEMS.get(j), rotation, combinedLightIn); + } + } + } + } + + private void render(PoseStack poseStack, VertexConsumer vertexConsumer, ModelPart lid, ModelPart lock, ModelPart bottom, float openness, int brightness, int combinedOverlayIn) { + lid.xRot = -(openness * ((float) Math.PI / 2F)); + lock.xRot = lid.xRot; + + lid.render(poseStack, vertexConsumer, brightness, combinedOverlayIn); + lock.render(poseStack, vertexConsumer, brightness, combinedOverlayIn); + bottom.render(poseStack, vertexConsumer, brightness, combinedOverlayIn); + } + + /** + * Renders a single item in a TESR + * + * @param matrices Matrix stack instance + * @param buffer Buffer instance + * @param item Item to render + * @param modelItem Model items for render information + * @param light Model light + */ + public static void renderItem(PoseStack matrices, MultiBufferSource buffer, ItemStack item, ModelItem modelItem, float rotation, int light) { + // if no stack, skip + if (item.isEmpty()) return; + + // start rendering + matrices.pushPose(); + Vector3f center = modelItem.getCenter(); + matrices.translate(center.x(), center.y(), center.z()); + + matrices.mulPose(Vector3f.YP.rotation(rotation)); + + // scale + float scale = modelItem.getSizeScaled(); + matrices.scale(scale, scale, scale); + + // render the actual item + Minecraft.getInstance().getItemRenderer().renderStatic(item, ItemTransforms.TransformType.NONE, light, OverlayTexture.NO_OVERLAY, matrices, buffer, 0); + + matrices.popPose(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/render/package-info.java b/src/main/java/com/progwml6/ironchest/client/render/package-info.java new file mode 100644 index 00000000..68b255f0 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/render/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.client.render; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java b/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java new file mode 100644 index 00000000..b3e6c512 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java @@ -0,0 +1,62 @@ +package com.progwml6.ironchest.client.screen; + +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.systems.RenderSystem; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.client.gui.screens.inventory.MenuAccess; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.network.chat.Component; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +@OnlyIn(Dist.CLIENT) +public class IronChestScreen extends AbstractContainerScreen implements MenuAccess { + + private final IronChestsTypes chestType; + + private final int textureXSize; + + private final int textureYSize; + + public IronChestScreen(IronChestMenu container, Inventory playerInventory, Component title) { + super(container, playerInventory, title); + + this.chestType = container.getChestType(); + this.imageWidth = container.getChestType().xSize; + this.imageHeight = container.getChestType().ySize; + this.textureXSize = container.getChestType().textureXSize; + this.textureYSize = container.getChestType().textureYSize; + + this.passEvents = false; + } + + @Override + public void render(PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { + this.renderBackground(matrixStack); + super.render(matrixStack, mouseX, mouseY, partialTicks); + this.renderTooltip(matrixStack, mouseX, mouseY); + } + + @Override + protected void renderLabels(PoseStack matrixStack, int mouseX, int mouseY) { + this.font.draw(matrixStack, this.title, 8.0F, 6.0F, 4210752); + + this.font.draw(matrixStack, this.playerInventoryTitle, 8.0F, (float) (this.imageHeight - 96 + 2), 4210752); + } + + @Override + protected void renderBg(PoseStack poseStack, float partialTicks, int mouseX, int mouseY) { + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, this.chestType.guiTexture); + + int x = (this.width - this.imageWidth) / 2; + int y = (this.height - this.imageHeight) / 2; + + blit(poseStack, x, y, 0, 0, this.imageWidth, this.imageHeight, this.textureXSize, this.textureYSize); + } +} + diff --git a/src/main/java/com/progwml6/ironchest/client/screen/package-info.java b/src/main/java/com/progwml6/ironchest/client/screen/package-info.java new file mode 100644 index 00000000..7df14342 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/screen/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.client.screen; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/Util.java b/src/main/java/com/progwml6/ironchest/common/Util.java new file mode 100644 index 00000000..708beca4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/Util.java @@ -0,0 +1,16 @@ +package com.progwml6.ironchest.common; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Arrays; +import java.util.Locale; +import java.util.stream.Collectors; + +public class Util { + + public static String toEnglishName(String internalName) { + return Arrays.stream(internalName.toLowerCase(Locale.ROOT).split("_")) + .map(StringUtils::capitalize) + .collect(Collectors.joining(" ")); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java b/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java new file mode 100644 index 00000000..71a40acd --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java @@ -0,0 +1,33 @@ +package com.progwml6.ironchest.common.ai; + +import com.progwml6.ironchest.IronChests; +import net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal; +import net.minecraft.world.entity.ai.goal.WrappedGoal; +import net.minecraft.world.entity.animal.Cat; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +import java.util.HashSet; + +@Mod.EventBusSubscriber(modid = IronChests.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) +public class CatsSitOnChestsHandler { + + @SubscribeEvent + static void changeSittingTaskForOcelots(final LivingEvent.LivingUpdateEvent evt) { + if (evt.getEntityLiving().tickCount < 5 && evt.getEntityLiving() instanceof Cat cat) { + HashSet goals = new HashSet<>(); + + for (WrappedGoal goal : cat.goalSelector.availableGoals) { + if (goal.getGoal().getClass() == CatSitOnBlockGoal.class) { + goals.add(goal); + } + } + + for (WrappedGoal goal : goals) { + cat.goalSelector.removeGoal(goal.getGoal()); + cat.goalSelector.addGoal(goal.getPriority(), new IronChestCatSitOnBlockGoal(cat, 0.4F)); + } + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java b/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java new file mode 100644 index 00000000..a4c66b9e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java @@ -0,0 +1,33 @@ +package com.progwml6.ironchest.common.ai; + +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.entity.ai.goal.CatSitOnBlockGoal; +import net.minecraft.world.entity.animal.Cat; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.LevelReader; + +public class IronChestCatSitOnBlockGoal extends CatSitOnBlockGoal { + + public IronChestCatSitOnBlockGoal(Cat cat, double speedModifier) { + super(cat, speedModifier); + } + + @Override + protected boolean isValidTarget(LevelReader worldIn, BlockPos pos) { + if (!worldIn.isEmptyBlock(pos.above())) { + return false; + } else { + BlockState blockstate = worldIn.getBlockState(pos); + Block block = blockstate.getBlock(); + + if (block instanceof AbstractIronChestBlock) { + return AbstractIronChestBlockEntity.getOpenCount(worldIn, pos) < 1; + } + + return super.isValidTarget(worldIn, pos); + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/ai/package-info.java b/src/main/java/com/progwml6/ironchest/common/ai/package-info.java new file mode 100644 index 00000000..caafd4af --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/ai/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.ai; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java b/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java new file mode 100644 index 00000000..ea794304 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java @@ -0,0 +1,113 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.regular.CopperChestBlock; +import com.progwml6.ironchest.common.block.regular.CrystalChestBlock; +import com.progwml6.ironchest.common.block.regular.DiamondChestBlock; +import com.progwml6.ironchest.common.block.regular.DirtChestBlock; +import com.progwml6.ironchest.common.block.regular.GoldChestBlock; +import com.progwml6.ironchest.common.block.regular.IronChestBlock; +import com.progwml6.ironchest.common.block.regular.ObsidianChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedCopperChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedCrystalChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedDiamondChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedDirtChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedGoldChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedIronChestBlock; +import com.progwml6.ironchest.common.block.trapped.TrappedObsidianChestBlock; +import com.progwml6.ironchest.common.item.IronChestBlockItem; +import com.progwml6.ironchest.common.item.IronChestsItems; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Material; +import net.minecraftforge.fmllegacy.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.concurrent.Callable; +import java.util.function.Function; +import java.util.function.Supplier; + +public class IronChestsBlocks { + + public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, IronChests.MOD_ID); + public static final DeferredRegister ITEMS = IronChestsItems.ITEMS; + + public static final RegistryObject IRON_CHEST = register( + "iron_chest", () -> new IronChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.IRON, false); + + public static final RegistryObject GOLD_CHEST = register( + "gold_chest", () -> new GoldChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.GOLD, false); + + public static final RegistryObject DIAMOND_CHEST = register( + "diamond_chest", () -> new DiamondChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.DIAMOND, false); + + public static final RegistryObject COPPER_CHEST = register( + "copper_chest", () -> new CopperChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.COPPER, false); + + public static final RegistryObject CRYSTAL_CHEST = register( + "crystal_chest", () -> new CrystalChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.CRYSTAL, false); + + public static final RegistryObject OBSIDIAN_CHEST = register( + "obsidian_chest", () -> new ObsidianChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.OBSIDIAN, false); + + public static final RegistryObject DIRT_CHEST = register( + "dirt_chest", () -> new DirtChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.DIRT, false); + + // Trapped Chests + public static final RegistryObject TRAPPED_IRON_CHEST = register( + "trapped_iron_chest", () -> new TrappedIronChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.IRON, true); + + public static final RegistryObject TRAPPED_GOLD_CHEST = register( + "trapped_gold_chest", () -> new TrappedGoldChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.GOLD, true); + + public static final RegistryObject TRAPPED_DIAMOND_CHEST = register( + "trapped_diamond_chest", () -> new TrappedDiamondChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.DIAMOND, true); + + public static final RegistryObject TRAPPED_COPPER_CHEST = register( + "trapped_copper_chest", () -> new TrappedCopperChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.COPPER, true); + + public static final RegistryObject TRAPPED_CRYSTAL_CHEST = register( + "trapped_crystal_chest", () -> new TrappedCrystalChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.CRYSTAL, true); + + public static final RegistryObject TRAPPED_OBSIDIAN_CHEST = register( + "trapped_obsidian_chest", () -> new TrappedObsidianChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.OBSIDIAN, true); + + public static final RegistryObject TRAPPED_DIRT_CHEST = register( + "trapped_dirt_chest", () -> new TrappedDirtChestBlock(Block.Properties.of(Material.METAL).strength(3.0F)), + IronChestsTypes.DIRT, true); + + //HELPERS + + private static RegistryObject register(String name, Supplier sup, IronChestsTypes chestType, boolean trapped) { + return register(name, sup, block -> item(block, () -> () -> chestType, () -> () -> trapped)); + } + + 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, Supplier> chestType, Supplier> trapped) { + return () -> new IronChestBlockItem(block.get(), new Item.Properties().tab(IronChests.IRONCHESTS_ITEM_GROUP), chestType, trapped); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java b/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java new file mode 100644 index 00000000..1c263dd9 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java @@ -0,0 +1,126 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.Util; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.CopperChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.CrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DirtChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.GoldChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.IronChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.ObsidianChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCopperChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDirtChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedGoldChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedObsidianChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.util.StringRepresentable; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + +public enum IronChestsTypes implements StringRepresentable { + + IRON(54, 9, 184, 222, new ResourceLocation("ironchest", "textures/gui/iron_container.png"), 256, 256), + GOLD(81, 9, 184, 276, new ResourceLocation("ironchest", "textures/gui/gold_container.png"), 256, 276), + DIAMOND(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + COPPER(45, 9, 184, 204, new ResourceLocation("ironchest", "textures/gui/copper_container.png"), 256, 256), + CRYSTAL(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + OBSIDIAN(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + DIRT(1, 1, 184, 184, new ResourceLocation("ironchest", "textures/gui/dirt_container.png"), 256, 256), + WOOD(0, 0, 0, 0, null, 0, 0); + + private final String name; + public final int size; + public final int rowLength; + public final int xSize; + public final int ySize; + public final ResourceLocation guiTexture; + public final int textureXSize; + public final int textureYSize; + + IronChestsTypes(int size, int rowLength, int xSize, int ySize, ResourceLocation guiTexture, int textureXSize, int textureYSize) { + this(null, size, rowLength, xSize, ySize, guiTexture, textureXSize, textureYSize); + } + + IronChestsTypes(@Nullable String name, int size, int rowLength, int xSize, int ySize, ResourceLocation guiTexture, int textureXSize, int textureYSize) { + this.name = name == null ? Util.toEnglishName(this.name()) : name; + this.size = size; + this.rowLength = rowLength; + this.xSize = xSize; + this.ySize = ySize; + this.guiTexture = guiTexture; + this.textureXSize = textureXSize; + this.textureYSize = textureYSize; + } + + public String getId() { + return this.name().toLowerCase(Locale.ROOT); + } + + public String getEnglishName() { + return this.name; + } + + @Override + public String getSerializedName() { + return this.getEnglishName(); + } + + public int getRowCount() { + return this.size / this.rowLength; + } + + public boolean isTransparent() { + return this == CRYSTAL; + } + + public static List get(IronChestsTypes type) { + return switch (type) { + case IRON -> Arrays.asList(IronChestsBlocks.IRON_CHEST.get(), IronChestsBlocks.TRAPPED_IRON_CHEST.get()); + case GOLD -> Arrays.asList(IronChestsBlocks.GOLD_CHEST.get(), IronChestsBlocks.TRAPPED_GOLD_CHEST.get()); + case DIAMOND -> Arrays.asList(IronChestsBlocks.DIAMOND_CHEST.get(), IronChestsBlocks.TRAPPED_DIAMOND_CHEST.get()); + case COPPER -> Arrays.asList(IronChestsBlocks.COPPER_CHEST.get(), IronChestsBlocks.TRAPPED_COPPER_CHEST.get()); + case CRYSTAL -> Arrays.asList(IronChestsBlocks.CRYSTAL_CHEST.get(), IronChestsBlocks.TRAPPED_CRYSTAL_CHEST.get()); + case OBSIDIAN -> Arrays.asList(IronChestsBlocks.OBSIDIAN_CHEST.get(), IronChestsBlocks.TRAPPED_OBSIDIAN_CHEST.get()); + case DIRT -> Arrays.asList(IronChestsBlocks.DIRT_CHEST.get(), IronChestsBlocks.TRAPPED_DIRT_CHEST.get()); + default -> List.of(Blocks.CHEST); + }; + } + + @Nullable + public AbstractIronChestBlockEntity makeEntity(BlockPos blockPos, BlockState blockState, boolean trapped) { + if(trapped) { + return switch (this) { + case IRON -> new TrappedIronChestBlockEntity(blockPos, blockState); + case GOLD -> new TrappedGoldChestBlockEntity(blockPos, blockState); + case DIAMOND -> new TrappedDiamondChestBlockEntity(blockPos, blockState); + case COPPER -> new TrappedCopperChestBlockEntity(blockPos, blockState); + case CRYSTAL -> new TrappedCrystalChestBlockEntity(blockPos, blockState); + case OBSIDIAN -> new TrappedObsidianChestBlockEntity(blockPos, blockState); + case DIRT -> new TrappedDirtChestBlockEntity(blockPos, blockState); + default -> null; + }; + } else { + return switch (this) { + case IRON -> new IronChestBlockEntity(blockPos, blockState); + case GOLD -> new GoldChestBlockEntity(blockPos, blockState); + case DIAMOND -> new DiamondChestBlockEntity(blockPos, blockState); + case COPPER -> new CopperChestBlockEntity(blockPos, blockState); + case CRYSTAL -> new CrystalChestBlockEntity(blockPos, blockState); + case OBSIDIAN -> new ObsidianChestBlockEntity(blockPos, blockState); + case DIRT -> new DirtChestBlockEntity(blockPos, blockState); + default -> null; + }; + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/entity/ICrystalChest.java b/src/main/java/com/progwml6/ironchest/common/block/entity/ICrystalChest.java new file mode 100644 index 00000000..ef22e960 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/entity/ICrystalChest.java @@ -0,0 +1,153 @@ +package com.progwml6.ironchest.common.block.entity; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.network.InventoryTopStacksSyncPacket; +import com.progwml6.ironchest.common.network.IronChestNetwork; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +public interface ICrystalChest { + + default NonNullList buildItemStackDataList() { + if (this.getChestType().isTransparent()) { + NonNullList sortList = NonNullList.withSize(this.getTopItems().size(), ItemStack.EMPTY); + + int pos = 0; + + for (ItemStack is : this.getTopItems()) { + if (!is.isEmpty()) { + sortList.set(pos, is); + } else { + sortList.set(pos, ItemStack.EMPTY); + } + + pos++; + } + + return sortList; + } + + return NonNullList.withSize(this.getTopItems().size(), ItemStack.EMPTY); + } + + IronChestsTypes getChestType(); + + default void sendTopStacksPacket() { + NonNullList stacks = this.buildItemStackDataList(); + + if (this.getChestLevel() != null && this.getChestLevel() instanceof ServerLevel && !this.getChestLevel().isClientSide) { + IronChestNetwork.getInstance().sendToClientsAround(new InventoryTopStacksSyncPacket(stacks, this.getChestWorldPosition()), (ServerLevel) this.getChestLevel(), this.getChestWorldPosition()); + } + } + + NonNullList getTopItems(); + + Level getChestLevel(); + + BlockPos getChestWorldPosition(); + + void receiveMessageFromServer(NonNullList topStacks); + + default void sortTopStacks() { + if (!this.getChestType().isTransparent() || (this.getChestLevel() != null && this.getChestLevel().isClientSide)) { + return; + } + + NonNullList tempCopy = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); + + boolean hasStuff = false; + + int compressedIdx = 0; + + mainLoop: + for (int i = 0; i < this.getContainerSize(); i++) { + ItemStack itemStack = this.getItems().get(i); + + if (!itemStack.isEmpty()) { + for (int j = 0; j < compressedIdx; j++) { + ItemStack tempCopyStack = tempCopy.get(j); + + if (ItemStack.isSameIgnoreDurability(tempCopyStack, itemStack)) { + if (itemStack.getCount() != tempCopyStack.getCount()) { + tempCopyStack.grow(itemStack.getCount()); + } + + continue mainLoop; + } + } + + tempCopy.set(compressedIdx, itemStack.copy()); + + compressedIdx++; + + hasStuff = true; + } + } + + if (!hasStuff && this.getHadStuff()) { + this.setHadStuff(false); + + for (int i = 0; i < this.getTopItems().size(); i++) { + this.getTopItems().set(i, ItemStack.EMPTY); + } + + if (this.getChestLevel() != null) { + BlockState blockState = this.getChestLevel().getBlockState(this.getChestWorldPosition()); + + this.getChestLevel().sendBlockUpdated(this.getChestWorldPosition(), blockState, blockState, 3); + } + + return; + } + + this.setHadStuff(true); + + tempCopy.sort((stack1, stack2) -> { + if (stack1.isEmpty()) { + return 1; + } else if (stack2.isEmpty()) { + return -1; + } else { + return stack2.getCount() - stack1.getCount(); + } + }); + + int slot = 0; + + for (ItemStack itemStack : tempCopy) { + if (!itemStack.isEmpty() && itemStack.getCount() > 0) { + if (slot == this.getTopItems().size()) { + break; + } + + this.getTopItems().set(slot, itemStack); + + slot++; + } + } + + for (int i = slot; i < this.getTopItems().size(); i++) { + this.getTopItems().set(i, ItemStack.EMPTY); + } + + if (this.getChestLevel() != null) { + BlockState blockState = this.getChestLevel().getBlockState(this.getChestWorldPosition()); + + this.getChestLevel().sendBlockUpdated(this.getChestWorldPosition(), blockState, blockState, 3); + } + + this.sendTopStacksPacket(); + } + + NonNullList getItems(); + + void setHadStuff(boolean hadStuff); + + boolean getHadStuff(); + + int getContainerSize(); +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/entity/IronChestsBlockEntityTypes.java b/src/main/java/com/progwml6/ironchest/common/block/entity/IronChestsBlockEntityTypes.java new file mode 100644 index 00000000..7ddecfa4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/entity/IronChestsBlockEntityTypes.java @@ -0,0 +1,71 @@ +package com.progwml6.ironchest.common.block.entity; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.regular.entity.CopperChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.CrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DirtChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.GoldChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.IronChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.ObsidianChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCopperChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDirtChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedGoldChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedObsidianChestBlockEntity; + +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.fmllegacy.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +public class IronChestsBlockEntityTypes { + public static final DeferredRegister> BLOCK_ENTITIES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, IronChests.MOD_ID); + + public static final RegistryObject> IRON_CHEST = BLOCK_ENTITIES.register( + "iron_chest", () -> BlockEntityType.Builder.of(IronChestBlockEntity::new, IronChestsBlocks.IRON_CHEST.get()).build(null)); + + public static final RegistryObject> GOLD_CHEST = BLOCK_ENTITIES.register( + "gold_chest", () -> BlockEntityType.Builder.of(GoldChestBlockEntity::new, IronChestsBlocks.GOLD_CHEST.get()).build(null)); + + public static final RegistryObject> DIAMOND_CHEST = BLOCK_ENTITIES.register( + "diamond_chest", () -> BlockEntityType.Builder.of(DiamondChestBlockEntity::new, IronChestsBlocks.DIAMOND_CHEST.get()).build(null)); + + public static final RegistryObject> COPPER_CHEST = BLOCK_ENTITIES.register( + "copper_chest", () -> BlockEntityType.Builder.of(CopperChestBlockEntity::new, IronChestsBlocks.COPPER_CHEST.get()).build(null)); + + public static final RegistryObject> CRYSTAL_CHEST = BLOCK_ENTITIES.register( + "crystal_chest", () -> BlockEntityType.Builder.of(CrystalChestBlockEntity::new, IronChestsBlocks.CRYSTAL_CHEST.get()).build(null)); + + public static final RegistryObject> OBSIDIAN_CHEST = BLOCK_ENTITIES.register( + "obsidian_chest", () -> BlockEntityType.Builder.of(ObsidianChestBlockEntity::new, IronChestsBlocks.OBSIDIAN_CHEST.get()).build(null)); + + public static final RegistryObject> DIRT_CHEST = BLOCK_ENTITIES.register( + "dirt_chest", () -> BlockEntityType.Builder.of(DirtChestBlockEntity::new, IronChestsBlocks.DIRT_CHEST.get()).build(null)); + + // Trapped Chests + + public static final RegistryObject> TRAPPED_IRON_CHEST = BLOCK_ENTITIES.register( + "trapped_iron_chest", () -> BlockEntityType.Builder.of(TrappedIronChestBlockEntity::new, IronChestsBlocks.TRAPPED_IRON_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_GOLD_CHEST = BLOCK_ENTITIES.register( + "trapped_gold_chest", () -> BlockEntityType.Builder.of(TrappedGoldChestBlockEntity::new, IronChestsBlocks.TRAPPED_GOLD_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_DIAMOND_CHEST = BLOCK_ENTITIES.register( + "trapped_diamond_chest", () -> BlockEntityType.Builder.of(TrappedDiamondChestBlockEntity::new, IronChestsBlocks.TRAPPED_DIAMOND_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_COPPER_CHEST = BLOCK_ENTITIES.register( + "trapped_copper_chest", () -> BlockEntityType.Builder.of(TrappedCopperChestBlockEntity::new, IronChestsBlocks.TRAPPED_COPPER_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_CRYSTAL_CHEST = BLOCK_ENTITIES.register( + "trapped_crystal_chest", () -> BlockEntityType.Builder.of(TrappedCrystalChestBlockEntity::new, IronChestsBlocks.TRAPPED_CRYSTAL_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_OBSIDIAN_CHEST = BLOCK_ENTITIES.register( + "trapped_obsidian_chest", () -> BlockEntityType.Builder.of(TrappedObsidianChestBlockEntity::new, IronChestsBlocks.TRAPPED_OBSIDIAN_CHEST.get()).build(null)); + + public static final RegistryObject> TRAPPED_DIRT_CHEST = BLOCK_ENTITIES.register( + "trapped_dirt_chest", () -> BlockEntityType.Builder.of(TrappedDirtChestBlockEntity::new, IronChestsBlocks.TRAPPED_DIRT_CHEST.get()).build(null)); +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/entity/package-info.java b/src/main/java/com/progwml6/ironchest/common/block/entity/package-info.java new file mode 100644 index 00000000..79c16fce --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/entity/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.block.entity; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/block/package-info.java b/src/main/java/com/progwml6/ironchest/common/block/package-info.java new file mode 100644 index 00000000..ad133309 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.block; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/AbstractIronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/AbstractIronChestBlock.java new file mode 100644 index 00000000..16fd0606 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/AbstractIronChestBlock.java @@ -0,0 +1,333 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import it.unimi.dsi.fastutil.floats.Float2FloatFunction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.stats.Stat; +import net.minecraft.stats.Stats; +import net.minecraft.world.CompoundContainer; +import net.minecraft.world.Container; +import net.minecraft.world.Containers; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.animal.Cat; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.BaseEntityBlock; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.DoubleBlockCombiner; +import net.minecraft.world.level.block.HorizontalDirectionalBlock; +import net.minecraft.world.level.block.Mirror; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.SimpleWaterloggedBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.entity.LidBlockEntity; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.FluidState; +import net.minecraft.world.level.material.Fluids; +import net.minecraft.world.level.pathfinder.PathComputationType; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; +import java.util.List; +import java.util.Optional; +import java.util.Random; +import java.util.function.BiPredicate; +import java.util.function.Supplier; + +public abstract class AbstractIronChestBlock extends BaseEntityBlock implements SimpleWaterloggedBlock { + + public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; + + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + + protected static final VoxelShape AABB = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); + + private static final DoubleBlockCombiner.Combiner> CHEST_COMBINER = new DoubleBlockCombiner.Combiner<>() { + @Override + public Optional acceptDouble(AbstractIronChestBlockEntity blockEntityOne, AbstractIronChestBlockEntity blockEntityTwo) { + return Optional.of(new CompoundContainer(blockEntityOne, blockEntityTwo)); + } + + @Override + public Optional acceptSingle(AbstractIronChestBlockEntity blockEntity) { + return Optional.of(blockEntity); + } + + @Override + public Optional acceptNone() { + return Optional.empty(); + } + }; + + private static final DoubleBlockCombiner.Combiner> MENU_PROVIDER_COMBINER = new DoubleBlockCombiner.Combiner<>() { + @Override + public Optional acceptDouble(AbstractIronChestBlockEntity blockEntityOne, AbstractIronChestBlockEntity blockEntityTwo) { + return Optional.empty(); + } + + @Override + public Optional acceptSingle(AbstractIronChestBlockEntity blockEntity) { + return Optional.of(blockEntity); + } + + @Override + public Optional acceptNone() { + return Optional.empty(); + } + }; + + private final IronChestsTypes type; + + protected final Supplier> blockEntityType; + + public AbstractIronChestBlock(BlockBehaviour.Properties properties, Supplier> blockEntityType, IronChestsTypes type) { + super(properties); + + this.type = type; + this.blockEntityType = blockEntityType; + + this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.FALSE)); + } + + public static DoubleBlockCombiner.BlockType getBlockType(BlockState blockState) { + return DoubleBlockCombiner.BlockType.SINGLE; + } + + @Override + public RenderShape getRenderShape(BlockState state) { + return RenderShape.ENTITYBLOCK_ANIMATED; + } + + @Override + @Deprecated + public BlockState updateShape(BlockState blockState, Direction direction, BlockState facingState, LevelAccessor levelAccessor, BlockPos currentPos, BlockPos facingPos) { + if (blockState.getValue(WATERLOGGED)) { + levelAccessor.getLiquidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickDelay(levelAccessor)); + } + + return super.updateShape(blockState, direction, facingState, levelAccessor, currentPos, facingPos); + } + + @Override + @Deprecated + public VoxelShape getShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext context) { + return AABB; + } + + public static Direction getConnectedDirection(BlockState blockState) { + return blockState.getValue(FACING).getCounterClockWise(); + } + + @Override + public BlockState getStateForPlacement(BlockPlaceContext context) { + Direction direction = context.getHorizontalDirection().getOpposite(); + FluidState fluidState = context.getLevel().getFluidState(context.getClickedPos()); + + return this.defaultBlockState().setValue(FACING, direction).setValue(WATERLOGGED, fluidState.getType() == Fluids.WATER); + } + + @Override + @Deprecated + public FluidState getFluidState(BlockState blockState) { + return blockState.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(blockState); + } + + @Override + public void setPlacedBy(Level level, BlockPos blockPos, BlockState blockState, @Nullable LivingEntity livingEntity, ItemStack itemStack) { + BlockEntity blockEntity = level.getBlockEntity(blockPos); + + if (blockEntity instanceof AbstractIronChestBlockEntity) { + ((AbstractIronChestBlockEntity) blockEntity).wasPlaced(livingEntity, itemStack); + + if (itemStack.hasCustomHoverName()) { + ((AbstractIronChestBlockEntity) blockEntity).setCustomName(itemStack.getHoverName()); + } + } + } + + @Override + @Deprecated + public void onRemove(BlockState blockState, Level level, BlockPos blockPos, BlockState newState, boolean isMoving) { + if (!blockState.is(newState.getBlock())) { + BlockEntity blockentity = level.getBlockEntity(blockPos); + if (blockentity instanceof Container) { + Containers.dropContents(level, blockPos, (Container) blockentity); + level.updateNeighbourForOutputSignal(blockPos, this); + } + + super.onRemove(blockState, level, blockPos, newState, isMoving); + } + } + + @Override + @Deprecated + public InteractionResult use(BlockState blockState, Level level, BlockPos blockPos, Player player, InteractionHand interactionHand, BlockHitResult blockHitResult) { + if (level.isClientSide) { + return InteractionResult.SUCCESS; + } else { + MenuProvider menuProvider = this.getMenuProvider(blockState, level, blockPos); + + if (menuProvider != null) { + player.openMenu(menuProvider); + player.awardStat(this.getOpenChestStat()); + } + + return InteractionResult.CONSUME; + } + } + + protected Stat getOpenChestStat() { + return Stats.CUSTOM.get(Stats.OPEN_CHEST); + } + + public BlockEntityType blockEntityType() { + return this.blockEntityType.get(); + } + + @Nullable + public static Container getContainer(AbstractIronChestBlock chestBlock, BlockState blockState, Level level, BlockPos blockPos, boolean ignoreBlockedChest) { + return chestBlock.combine(blockState, level, blockPos, ignoreBlockedChest).>apply(CHEST_COMBINER).orElse((Container) null); + } + + public DoubleBlockCombiner.NeighborCombineResult combine(BlockState blockState, Level level, BlockPos blockPos, boolean ignoreBlockedChest) { + BiPredicate biPredicate; + + if (ignoreBlockedChest) { + biPredicate = (levelAccessor, blockPos1) -> { + return false; + }; + } else { + biPredicate = AbstractIronChestBlock::isChestBlockedAt; + } + + return DoubleBlockCombiner.combineWithNeigbour(this.blockEntityType.get(), AbstractIronChestBlock::getBlockType, AbstractIronChestBlock::getConnectedDirection, FACING, blockState, level, blockPos, biPredicate); + } + + @Nullable + public MenuProvider getMenuProvider(BlockState blockState, Level level, BlockPos blockPos) { + return this.combine(blockState, level, blockPos, false).>apply(MENU_PROVIDER_COMBINER).orElse((MenuProvider) null); + } + + public static DoubleBlockCombiner.Combiner opennessCombiner(final LidBlockEntity lidBlockEntity) { + return new DoubleBlockCombiner.Combiner<>() { + public Float2FloatFunction acceptDouble(AbstractIronChestBlockEntity blockEntityOne, AbstractIronChestBlockEntity blockEntityTwo) { + return (lidBlockEntity) -> Math.max(blockEntityOne.getOpenNess(lidBlockEntity), blockEntityTwo.getOpenNess(lidBlockEntity)); + } + + public Float2FloatFunction acceptSingle(AbstractIronChestBlockEntity blockEntity) { + return blockEntity::getOpenNess; + } + + public Float2FloatFunction acceptNone() { + return lidBlockEntity::getOpenNess; + } + }; + } + + @Override + @Nullable + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { + return level.isClientSide ? createTickerHelper(blockEntityType, this.blockEntityType(), AbstractIronChestBlockEntity::lidAnimateTick) : null; + } + + public static boolean isChestBlockedAt(LevelAccessor levelAccessor, BlockPos blockPos) { + return isBlockedChestByBlock(levelAccessor, blockPos) || isCatSittingOnChest(levelAccessor, blockPos); + } + + private static boolean isBlockedChestByBlock(BlockGetter blockGetter, BlockPos blockPos) { + BlockPos above = blockPos.above(); + + return blockGetter.getBlockState(above).isRedstoneConductor(blockGetter, above); + } + + private static boolean isCatSittingOnChest(LevelAccessor levelAccessor, BlockPos blockPos) { + List list = levelAccessor.getEntitiesOfClass(Cat.class, new AABB((double) blockPos.getX(), (double) (blockPos.getY() + 1), (double) blockPos.getZ(), (double) (blockPos.getX() + 1), (double) (blockPos.getY() + 2), (double) (blockPos.getZ() + 1))); + + if (!list.isEmpty()) { + for (Cat cat : list) { + if (cat.isInSittingPose()) { + return true; + } + } + } + + return false; + } + + @Override + public boolean hasAnalogOutputSignal(BlockState blockState) { + return true; + } + + @Override + public int getAnalogOutputSignal(BlockState blockState, Level level, BlockPos blockPos) { + return AbstractContainerMenu.getRedstoneSignalFromContainer(getContainer(this, blockState, level, blockPos, false)); + } + + @Override + public BlockState rotate(BlockState blockState, Rotation rotation) { + return blockState.setValue(FACING, rotation.rotate(blockState.getValue(FACING))); + } + + @Override + public BlockState mirror(BlockState blockState, Mirror mirror) { + return blockState.rotate(mirror.getRotation(blockState.getValue(FACING))); + } + + @Override + protected void createBlockStateDefinition(StateDefinition.Builder blockBlockStateBuilder) { + blockBlockStateBuilder.add(FACING, WATERLOGGED); + } + + @Override + public boolean isPathfindable(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, PathComputationType pathComputationType) { + return false; + } + + @Override + public void tick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, Random random) { + BlockEntity blockEntity = serverLevel.getBlockEntity(blockPos); + + if (blockEntity instanceof AbstractIronChestBlockEntity) { + ((AbstractIronChestBlockEntity) blockEntity).recheckOpen(); + } + } + + @Nullable + public static IronChestsTypes getTypeFromItem(Item itemIn) { + return getTypeFromBlock(Block.byItem(itemIn)); + } + + @Nullable + public static IronChestsTypes getTypeFromBlock(Block block) { + return block instanceof AbstractIronChestBlock ? ((AbstractIronChestBlock) block).getType() : null; + } + + public IronChestsTypes getType() { + return this.type; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/CopperChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/CopperChestBlock.java new file mode 100644 index 00000000..48038154 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/CopperChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.CopperChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class CopperChestBlock extends AbstractIronChestBlock { + + public CopperChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.COPPER_CHEST::get, IronChestsTypes.COPPER); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new CopperChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/CrystalChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/CrystalChestBlock.java new file mode 100644 index 00000000..37aa0418 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/CrystalChestBlock.java @@ -0,0 +1,33 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.CrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class CrystalChestBlock extends AbstractIronChestBlock { + + public CrystalChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.CRYSTAL_CHEST::get, IronChestsTypes.CRYSTAL); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new CrystalChestBlockEntity(blockPos, blockState); + } + + @Override + @Nullable + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { + return level.isClientSide ? createTickerHelper(blockEntityType, this.blockEntityType(), AbstractIronChestBlockEntity::lidAnimateTick) : createTickerHelper(blockEntityType, this.blockEntityType(), CrystalChestBlockEntity::tick); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/DiamondChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/DiamondChestBlock.java new file mode 100644 index 00000000..d2d13ea1 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/DiamondChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.DiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class DiamondChestBlock extends AbstractIronChestBlock { + + public DiamondChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.DIAMOND_CHEST::get, IronChestsTypes.DIAMOND); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new DiamondChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/DirtChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/DirtChestBlock.java new file mode 100644 index 00000000..4c8d0028 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/DirtChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.DirtChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class DirtChestBlock extends AbstractIronChestBlock { + + public DirtChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.DIRT_CHEST::get, IronChestsTypes.DIRT); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new DirtChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/GoldChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/GoldChestBlock.java new file mode 100644 index 00000000..0bae0a0e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/GoldChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.GoldChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class GoldChestBlock extends AbstractIronChestBlock { + + public GoldChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.GOLD_CHEST::get, IronChestsTypes.GOLD); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new GoldChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/IronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/IronChestBlock.java new file mode 100644 index 00000000..b74e9b3f --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/IronChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.IronChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class IronChestBlock extends AbstractIronChestBlock { + + public IronChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.IRON_CHEST::get, IronChestsTypes.IRON); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new IronChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/ObsidianChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/regular/ObsidianChestBlock.java new file mode 100644 index 00000000..75abcf0b --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/ObsidianChestBlock.java @@ -0,0 +1,24 @@ +package com.progwml6.ironchest.common.block.regular; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.regular.entity.ObsidianChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class ObsidianChestBlock extends AbstractIronChestBlock { + + public ObsidianChestBlock(BlockBehaviour.Properties properties) { + super(properties, IronChestsBlockEntityTypes.OBSIDIAN_CHEST::get, IronChestsTypes.OBSIDIAN); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new ObsidianChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/AbstractIronChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/AbstractIronChestBlockEntity.java new file mode 100644 index 00000000..8ceb9d68 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/AbstractIronChestBlockEntity.java @@ -0,0 +1,213 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.CompoundContainer; +import net.minecraft.world.Container; +import net.minecraft.world.ContainerHelper; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.entity.ChestLidController; +import net.minecraft.world.level.block.entity.ContainerOpenersCounter; +import net.minecraft.world.level.block.entity.LidBlockEntity; +import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; +import java.util.function.Supplier; + +public abstract class AbstractIronChestBlockEntity extends RandomizableContainerBlockEntity implements LidBlockEntity { + + private static final int EVENT_SET_OPEN_COUNT = 1; + private NonNullList items; + + private final ContainerOpenersCounter openersCounter = new ContainerOpenersCounter() { + protected void onOpen(Level level, BlockPos pos, BlockState blockState) { + AbstractIronChestBlockEntity.playSound(level, pos, blockState, SoundEvents.CHEST_OPEN); + } + + protected void onClose(Level level, BlockPos pos, BlockState blockState) { + AbstractIronChestBlockEntity.playSound(level, pos, blockState, SoundEvents.CHEST_CLOSE); + } + + protected void openerCountChanged(Level level, BlockPos pos, BlockState blockState, int previousCount, int newCount) { + AbstractIronChestBlockEntity.this.signalOpenCount(level, pos, blockState, previousCount, newCount); + } + + protected boolean isOwnContainer(Player player) { + if (!(player.containerMenu instanceof IronChestMenu)) { + return false; + } else { + Container container = ((IronChestMenu) player.containerMenu).getContainer(); + return container instanceof AbstractIronChestBlockEntity || container instanceof CompoundContainer && ((CompoundContainer) container).contains(AbstractIronChestBlockEntity.this); + } + } + }; + + private final ChestLidController chestLidController = new ChestLidController(); + + private final IronChestsTypes chestType; + private final Supplier blockToUse; + + protected AbstractIronChestBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState, IronChestsTypes chestTypeIn, Supplier blockToUseIn) { + super(blockEntityType, blockPos, blockState); + + this.items = NonNullList.withSize(chestTypeIn.size, ItemStack.EMPTY); + this.chestType = chestTypeIn; + this.blockToUse = blockToUseIn; + } + + @Override + public int getContainerSize() { + return this.getItems().size(); + } + + @Override + protected Component getDefaultName() { + return new TranslatableComponent(IronChests.MOD_ID + ".container." + this.chestType.getId() + "_chest"); + } + + @Override + public void load(CompoundTag compoundTag) { + super.load(compoundTag); + + this.items = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); + + if (!this.tryLoadLootTable(compoundTag)) { + ContainerHelper.loadAllItems(compoundTag, this.items); + } + } + + @Override + public CompoundTag save(CompoundTag compoundTag) { + super.save(compoundTag); + + if (!this.trySaveLootTable(compoundTag)) { + ContainerHelper.saveAllItems(compoundTag, this.items); + } + + return compoundTag; + } + + public static void lidAnimateTick(Level level, BlockPos blockPos, BlockState blockState, AbstractIronChestBlockEntity chestBlockEntity) { + chestBlockEntity.chestLidController.tickLid(); + } + + static void playSound(Level level, BlockPos blockPos, BlockState blockState, SoundEvent soundEvent) { + double d0 = (double) blockPos.getX() + 0.5D; + double d1 = (double) blockPos.getY() + 0.5D; + double d2 = (double) blockPos.getZ() + 0.5D; + + level.playSound((Player) null, d0, d1, d2, soundEvent, SoundSource.BLOCKS, 0.5F, level.random.nextFloat() * 0.1F + 0.9F); + } + + @Override + public boolean triggerEvent(int id, int type) { + if (id == 1) { + this.chestLidController.shouldBeOpen(type > 0); + return true; + } else { + return super.triggerEvent(id, type); + } + } + + @Override + public void startOpen(Player player) { + if (!this.remove && !player.isSpectator()) { + this.openersCounter.incrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); + } + } + + @Override + public void stopOpen(Player player) { + if (!this.remove && !player.isSpectator()) { + this.openersCounter.decrementOpeners(player, this.getLevel(), this.getBlockPos(), this.getBlockState()); + } + } + + @Override + public NonNullList getItems() { + return this.items; + } + + @Override + public void setItems(NonNullList itemsIn) { + this.items = NonNullList.withSize(this.getChestType().size, ItemStack.EMPTY); + + for (int i = 0; i < itemsIn.size(); i++) { + if (i < this.items.size()) { + this.getItems().set(i, itemsIn.get(i)); + } + } + } + + @Override + public float getOpenNess(float partialTicks) { + return this.chestLidController.getOpenness(partialTicks); + } + + public static int getOpenCount(BlockGetter blockGetter, BlockPos blockPos) { + BlockState blockstate = blockGetter.getBlockState(blockPos); + + if (blockstate.hasBlockEntity()) { + BlockEntity blockentity = blockGetter.getBlockEntity(blockPos); + + if (blockentity instanceof AbstractIronChestBlockEntity) { + return ((AbstractIronChestBlockEntity) blockentity).openersCounter.getOpenerCount(); + } + } + + return 0; + } + + public void recheckOpen() { + if (!this.remove) { + this.openersCounter.recheckOpeners(this.getLevel(), this.getBlockPos(), this.getBlockState()); + } + } + + protected void signalOpenCount(Level level, BlockPos blockPos, BlockState blockState, int previousCount, int newCount) { + Block block = blockState.getBlock(); + level.blockEvent(blockPos, block, 1, newCount); + } + + public void wasPlaced(@Nullable LivingEntity livingEntity, ItemStack stack) { + } + + public void removeAdornments() { + } + + public IronChestsTypes getChestType() { + IronChestsTypes type = IronChestsTypes.IRON; + + if (this.hasLevel()) { + IronChestsTypes typeFromBlock = AbstractIronChestBlock.getTypeFromBlock(this.getBlockState().getBlock()); + + if (typeFromBlock != null) { + type = typeFromBlock; + } + } + + return type; + } + + public Block getBlockToUse() { + return this.blockToUse.get(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CopperChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CopperChestBlockEntity.java new file mode 100644 index 00000000..e36b71c7 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CopperChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class CopperChestBlockEntity extends AbstractIronChestBlockEntity { + + public CopperChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.COPPER_CHEST.get(), blockPos, blockState, IronChestsTypes.COPPER, IronChestsBlocks.COPPER_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createCopperContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CrystalChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CrystalChestBlockEntity.java new file mode 100644 index 00000000..17b64829 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/CrystalChestBlockEntity.java @@ -0,0 +1,86 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.ICrystalChest; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +public class CrystalChestBlockEntity extends AbstractIronChestBlockEntity implements ICrystalChest { + + private NonNullList topStacks; + private boolean inventoryTouched; + private boolean hadStuff; + + public CrystalChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.CRYSTAL_CHEST.get(), blockPos, blockState, IronChestsTypes.CRYSTAL, IronChestsBlocks.CRYSTAL_CHEST::get); + + this.topStacks = NonNullList.withSize(8, ItemStack.EMPTY); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createCrystalContainer(containerId, playerInventory, this); + } + + public static void tick(Level level, BlockPos blockPos, BlockState blockState, AbstractIronChestBlockEntity chestBlockEntity) { + if (chestBlockEntity instanceof CrystalChestBlockEntity crystalChestBlockEntity) { + if (!level.isClientSide && crystalChestBlockEntity.inventoryTouched) { + crystalChestBlockEntity.inventoryTouched = false; + + crystalChestBlockEntity.sortTopStacks(); + } + } + } + + @Override + public void setItems(NonNullList contents) { + super.setItems(contents); + + this.inventoryTouched = true; + } + + @Override + public ItemStack getItem(int index) { + this.inventoryTouched = true; + + return super.getItem(index); + } + + @Override + public NonNullList getTopItems() { + return this.topStacks; + } + + @Override + public Level getChestLevel() { + return this.level; + } + + @Override + public BlockPos getChestWorldPosition() { + return this.worldPosition; + } + + @Override + public void receiveMessageFromServer(NonNullList topStacks) { + this.topStacks = topStacks; + } + + @Override + public void setHadStuff(boolean hadStuff) { + this.hadStuff = hadStuff; + } + + @Override + public boolean getHadStuff() { + return this.hadStuff; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DiamondChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DiamondChestBlockEntity.java new file mode 100644 index 00000000..16af11d1 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DiamondChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class DiamondChestBlockEntity extends AbstractIronChestBlockEntity { + + public DiamondChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.DIAMOND_CHEST.get(), blockPos, blockState, IronChestsTypes.DIAMOND, IronChestsBlocks.DIAMOND_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createDiamondContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DirtChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DirtChestBlockEntity.java new file mode 100644 index 00000000..2ae60311 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/DirtChestBlockEntity.java @@ -0,0 +1,73 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; +import java.util.Objects; + +public class DirtChestBlockEntity extends AbstractIronChestBlockEntity { + + private static ItemStack DIRT_CHEST_BOOK = new ItemStack(Items.WRITTEN_BOOK); + + private static boolean bookDataCreated = false; + + public DirtChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.DIRT_CHEST.get(), blockPos, blockState, IronChestsTypes.DIRT, IronChestsBlocks.DIRT_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createDirtContainer(containerId, playerInventory, this); + } + + @Override + public void wasPlaced(@Nullable LivingEntity livingEntity, ItemStack itemStack) { + if (!(itemStack.hasTag() && Objects.requireNonNull(itemStack.getTag()).getBoolean("been_placed"))) { + //TODO FIX BOOK + //this.setInventorySlotContents(0, DIRT_CHEST_BOOK.copy()); + } + + if (!bookDataCreated) { + //createBookData(); + } + } + + @Override + public void removeAdornments() { + if (!this.getItems().get(0).isEmpty() && this.getItems().get(0).sameItem(DIRT_CHEST_BOOK)) { + this.getItems().set(0, ItemStack.EMPTY); + } + } + + private static void createBookData() { + DIRT_CHEST_BOOK.addTagElement("author", StringTag.valueOf("cpw")); + + DIRT_CHEST_BOOK.addTagElement("title", StringTag.valueOf(I18n.get("book.ironchest.dirtchest9000.title"))); + + ListTag pages = new ListTag(); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page1")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page2")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page3")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page4")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page5")))); + + DIRT_CHEST_BOOK.addTagElement("pages", pages); + + bookDataCreated = true; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/GoldChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/GoldChestBlockEntity.java new file mode 100644 index 00000000..c28c6ac0 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/GoldChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class GoldChestBlockEntity extends AbstractIronChestBlockEntity { + + public GoldChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.GOLD_CHEST.get(), blockPos, blockState, IronChestsTypes.GOLD, IronChestsBlocks.GOLD_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createGoldContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/IronChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/IronChestBlockEntity.java new file mode 100644 index 00000000..d238b5b7 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/IronChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class IronChestBlockEntity extends AbstractIronChestBlockEntity { + + public IronChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.IRON_CHEST.get(), blockPos, blockState, IronChestsTypes.IRON, IronChestsBlocks.IRON_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createIronContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/entity/ObsidianChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/ObsidianChestBlockEntity.java new file mode 100644 index 00000000..a89a529c --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/entity/ObsidianChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.regular.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class ObsidianChestBlockEntity extends AbstractIronChestBlockEntity { + + public ObsidianChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.OBSIDIAN_CHEST.get(), blockPos, blockState, IronChestsTypes.OBSIDIAN, IronChestsBlocks.OBSIDIAN_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createObsidianContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/regular/package-info.java b/src/main/java/com/progwml6/ironchest/common/block/regular/package-info.java new file mode 100644 index 00000000..e3e360cb --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/regular/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.block.regular; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/AbstractTrappedIronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/AbstractTrappedIronChestBlock.java new file mode 100644 index 00000000..9ad33597 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/AbstractTrappedIronChestBlock.java @@ -0,0 +1,44 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.AbstractTrappedIronChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.stats.Stat; +import net.minecraft.stats.Stats; +import net.minecraft.util.Mth; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.function.Supplier; + +public abstract class AbstractTrappedIronChestBlock extends AbstractIronChestBlock { + + public AbstractTrappedIronChestBlock(Properties properties, Supplier> blockEntityType, IronChestsTypes type) { + super(properties, blockEntityType, type); + } + + @Override + protected Stat getOpenChestStat() { + return Stats.CUSTOM.get(Stats.TRIGGER_TRAPPED_CHEST); + } + + @Override + public boolean isSignalSource(BlockState blockState) { + return true; + } + + @Override + public int getSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) { + return Mth.clamp(AbstractTrappedIronChestBlockEntity.getOpenCount(blockGetter, blockPos), 0, 15); + } + + @Override + public int getDirectSignal(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, Direction direction) { + return direction == Direction.UP ? blockState.getSignal(blockGetter, blockPos, direction) : 0; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCopperChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCopperChestBlock.java new file mode 100644 index 00000000..919a98ff --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCopperChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCopperChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedCopperChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedCopperChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_COPPER_CHEST::get, IronChestsTypes.COPPER); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedCopperChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCrystalChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCrystalChestBlock.java new file mode 100644 index 00000000..6612c736 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedCrystalChestBlock.java @@ -0,0 +1,33 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedCrystalChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedCrystalChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_CRYSTAL_CHEST::get, IronChestsTypes.CRYSTAL); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedCrystalChestBlockEntity(blockPos, blockState); + } + + @Override + @Nullable + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType blockEntityType) { + return level.isClientSide ? createTickerHelper(blockEntityType, this.blockEntityType(), AbstractIronChestBlockEntity::lidAnimateTick) : createTickerHelper(blockEntityType, this.blockEntityType(), TrappedCrystalChestBlockEntity::tick); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDiamondChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDiamondChestBlock.java new file mode 100644 index 00000000..41e34ea9 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDiamondChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDiamondChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedDiamondChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedDiamondChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_DIAMOND_CHEST::get, IronChestsTypes.DIAMOND); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedDiamondChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDirtChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDirtChestBlock.java new file mode 100644 index 00000000..862e28c7 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedDirtChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDirtChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedDirtChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedDirtChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_DIRT_CHEST::get, IronChestsTypes.DIRT); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedDirtChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedGoldChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedGoldChestBlock.java new file mode 100644 index 00000000..66bc1256 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedGoldChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedGoldChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedGoldChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedGoldChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_GOLD_CHEST::get, IronChestsTypes.GOLD); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedGoldChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedIronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedIronChestBlock.java new file mode 100644 index 00000000..e5571c55 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedIronChestBlock.java @@ -0,0 +1,25 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.IronChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedIronChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedIronChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedIronChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_IRON_CHEST::get, IronChestsTypes.IRON); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedIronChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedObsidianChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedObsidianChestBlock.java new file mode 100644 index 00000000..d70a9649 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/TrappedObsidianChestBlock.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedObsidianChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; + +public class TrappedObsidianChestBlock extends AbstractTrappedIronChestBlock { + + public TrappedObsidianChestBlock(Properties properties) { + super(properties, IronChestsBlockEntityTypes.TRAPPED_OBSIDIAN_CHEST::get, IronChestsTypes.OBSIDIAN); + } + + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) { + return new TrappedObsidianChestBlockEntity(blockPos, blockState); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/AbstractTrappedIronChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/AbstractTrappedIronChestBlockEntity.java new file mode 100644 index 00000000..01b48230 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/AbstractTrappedIronChestBlockEntity.java @@ -0,0 +1,30 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; + +import java.util.function.Supplier; + +public abstract class AbstractTrappedIronChestBlockEntity extends AbstractIronChestBlockEntity { + + protected AbstractTrappedIronChestBlockEntity(BlockEntityType blockEntityType, BlockPos blockPos, BlockState blockState, IronChestsTypes chestTypeIn, Supplier blockToUseIn) { + super(blockEntityType, blockPos, blockState, chestTypeIn, blockToUseIn); + } + + @Override + protected void signalOpenCount(Level level, BlockPos blockPos, BlockState blockState, int previousCount, int newCount) { + super.signalOpenCount(level, blockPos, blockState, previousCount, newCount); + + if (previousCount != newCount) { + Block block = blockState.getBlock(); + + level.updateNeighborsAt(blockPos, block); + level.updateNeighborsAt(blockPos.below(), block); + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCopperChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCopperChestBlockEntity.java new file mode 100644 index 00000000..b5bae16f --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCopperChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedCopperChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + public TrappedCopperChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_COPPER_CHEST.get(), blockPos, blockState, IronChestsTypes.COPPER, IronChestsBlocks.TRAPPED_COPPER_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createCopperContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCrystalChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCrystalChestBlockEntity.java new file mode 100644 index 00000000..c8dd47e4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedCrystalChestBlockEntity.java @@ -0,0 +1,87 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.entity.ICrystalChest; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedCrystalChestBlockEntity extends AbstractTrappedIronChestBlockEntity implements ICrystalChest { + + private NonNullList topStacks; + private boolean inventoryTouched; + private boolean hadStuff; + + public TrappedCrystalChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_CRYSTAL_CHEST.get(), blockPos, blockState, IronChestsTypes.CRYSTAL, IronChestsBlocks.TRAPPED_CRYSTAL_CHEST::get); + + this.topStacks = NonNullList.withSize(8, ItemStack.EMPTY); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createCrystalContainer(containerId, playerInventory, this); + } + + public static void tick(Level level, BlockPos blockPos, BlockState blockState, AbstractIronChestBlockEntity chestBlockEntity) { + if (chestBlockEntity instanceof TrappedCrystalChestBlockEntity crystalChest) { + if (!level.isClientSide && crystalChest.inventoryTouched) { + crystalChest.inventoryTouched = false; + + crystalChest.sortTopStacks(); + } + } + } + + @Override + public void setItems(NonNullList contents) { + super.setItems(contents); + + this.inventoryTouched = true; + } + + @Override + public ItemStack getItem(int index) { + this.inventoryTouched = true; + + return super.getItem(index); + } + + @Override + public NonNullList getTopItems() { + return this.topStacks; + } + + @Override + public Level getChestLevel() { + return this.level; + } + + @Override + public BlockPos getChestWorldPosition() { + return this.worldPosition; + } + + @Override + public void receiveMessageFromServer(NonNullList topStacks) { + this.topStacks = topStacks; + } + + @Override + public void setHadStuff(boolean hadStuff) { + this.hadStuff = hadStuff; + } + + @Override + public boolean getHadStuff() { + return this.hadStuff; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDiamondChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDiamondChestBlockEntity.java new file mode 100644 index 00000000..263503f1 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDiamondChestBlockEntity.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedDiamondChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + public TrappedDiamondChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_DIAMOND_CHEST.get(), blockPos, blockState, IronChestsTypes.DIAMOND, IronChestsBlocks.TRAPPED_DIAMOND_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createDiamondContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDirtChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDirtChestBlockEntity.java new file mode 100644 index 00000000..2bff4946 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedDirtChestBlockEntity.java @@ -0,0 +1,74 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.state.BlockState; + +import javax.annotation.Nullable; +import java.util.Objects; + +public class TrappedDirtChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + private static ItemStack DIRT_CHEST_BOOK = new ItemStack(Items.WRITTEN_BOOK); + + private static boolean bookDataCreated = false; + + public TrappedDirtChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_DIRT_CHEST.get(), blockPos, blockState, IronChestsTypes.DIRT, IronChestsBlocks.TRAPPED_DIRT_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createDirtContainer(containerId, playerInventory, this); + } + + @Override + public void wasPlaced(@Nullable LivingEntity livingEntity, ItemStack itemStack) { + if (!(itemStack.hasTag() && Objects.requireNonNull(itemStack.getTag()).getBoolean("been_placed"))) { + //TODO FIX BOOK + //this.setInventorySlotContents(0, DIRT_CHEST_BOOK.copy()); + } + + if (!bookDataCreated) { + //createBookData(); + } + } + + @Override + public void removeAdornments() { + if (!this.getItems().get(0).isEmpty() && this.getItems().get(0).sameItem(DIRT_CHEST_BOOK)) { + this.getItems().set(0, ItemStack.EMPTY); + } + } + + private static void createBookData() { + DIRT_CHEST_BOOK.addTagElement("author", StringTag.valueOf("cpw")); + + DIRT_CHEST_BOOK.addTagElement("title", StringTag.valueOf(I18n.get("book.ironchest.dirtchest9000.title"))); + + ListTag pages = new ListTag(); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page1")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page2")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page3")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page4")))); + pages.add(StringTag.valueOf(Component.Serializer.toJson(new TranslatableComponent("book.ironchest.dirtchest9000.page5")))); + + DIRT_CHEST_BOOK.addTagElement("pages", pages); + + bookDataCreated = true; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedGoldChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedGoldChestBlockEntity.java new file mode 100644 index 00000000..0b93670a --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedGoldChestBlockEntity.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedGoldChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + public TrappedGoldChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_GOLD_CHEST.get(), blockPos, blockState, IronChestsTypes.GOLD, IronChestsBlocks.TRAPPED_GOLD_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createGoldContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedIronChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedIronChestBlockEntity.java new file mode 100644 index 00000000..97ba93f0 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedIronChestBlockEntity.java @@ -0,0 +1,22 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedIronChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + public TrappedIronChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_IRON_CHEST.get(), blockPos, blockState, IronChestsTypes.IRON, IronChestsBlocks.TRAPPED_IRON_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createIronContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedObsidianChestBlockEntity.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedObsidianChestBlockEntity.java new file mode 100644 index 00000000..bb3b7190 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/TrappedObsidianChestBlockEntity.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.block.trapped.entity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.entity.IronChestsBlockEntityTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.inventory.IronChestMenu; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.block.state.BlockState; + +public class TrappedObsidianChestBlockEntity extends AbstractTrappedIronChestBlockEntity { + + public TrappedObsidianChestBlockEntity(BlockPos blockPos, BlockState blockState) { + super(IronChestsBlockEntityTypes.TRAPPED_OBSIDIAN_CHEST.get(), blockPos, blockState, IronChestsTypes.OBSIDIAN, IronChestsBlocks.TRAPPED_OBSIDIAN_CHEST::get); + } + + @Override + protected AbstractContainerMenu createMenu(int containerId, Inventory playerInventory) { + return IronChestMenu.createObsidianContainer(containerId, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/package-info.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/package-info.java new file mode 100644 index 00000000..20e28bb9 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/entity/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.block.trapped.entity; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/block/trapped/package-info.java b/src/main/java/com/progwml6/ironchest/common/block/trapped/package-info.java new file mode 100644 index 00000000..4006f146 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/trapped/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.block.trapped; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/data/IronChestsRecipeProvider.java b/src/main/java/com/progwml6/ironchest/common/data/IronChestsRecipeProvider.java new file mode 100644 index 00000000..65d0d44d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/data/IronChestsRecipeProvider.java @@ -0,0 +1,290 @@ +package com.progwml6.ironchest.common.data; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.item.IronChestsItems; +import com.progwml6.ironchest.common.item.IronChestsUpgradeType; +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.AdvancementRewards; +import net.minecraft.advancements.RequirementsStrategy; +import net.minecraft.advancements.critereon.RecipeUnlockedTrigger; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.tags.ItemTags; +import net.minecraft.world.level.ItemLike; +import net.minecraft.resources.ResourceLocation; +import net.minecraftforge.common.Tags; +import net.minecraftforge.common.crafting.ConditionalAdvancement; +import net.minecraftforge.common.crafting.ConditionalRecipe; +import net.minecraftforge.common.crafting.conditions.IConditionBuilder; +import net.minecraftforge.common.crafting.conditions.TagEmptyCondition; + +import java.util.Objects; +import java.util.function.Consumer; + +public class IronChestsRecipeProvider extends RecipeProvider implements IConditionBuilder { + + public static final Tags.IOptionalNamedTag INGOTS_COPPER = tag("ingots/copper"); + + public IronChestsRecipeProvider(DataGenerator generatorIn) { + super(generatorIn); + } + + @Override + protected void buildCraftingRecipes(Consumer consumer) { + this.addChestsRecipes(consumer); + this.addUpgradesRecipes(consumer); + } + + private void addChestsRecipes(Consumer consumer) { + String folder = "chests/"; + + ShapedRecipeBuilder.shaped(IronChestsBlocks.IRON_CHEST.get()) + .define('M', Tags.Items.INGOTS_IRON) + .define('S', Tags.Items.CHESTS_WOODEN) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_iron_ingot", has(Tags.Items.INGOTS_IRON)) + .save(consumer, location(folder + "vanilla_iron_chest")); + + ShapedRecipeBuilder.shaped(IronChestsBlocks.GOLD_CHEST.get()) + .define('M', Tags.Items.INGOTS_GOLD) + .define('S', IronChestsBlocks.IRON_CHEST.get()) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_gold_ingot", has(Tags.Items.INGOTS_GOLD)) + .save(consumer, location(folder + "iron_gold_chest")); + + ShapedRecipeBuilder.shaped(IronChestsBlocks.DIAMOND_CHEST.get()) + .define('M', Tags.Items.GEMS_DIAMOND) + .define('S', IronChestsBlocks.GOLD_CHEST.get()) + .define('G', Tags.Items.GLASS) + .pattern("GGG") + .pattern("MSM") + .pattern("GGG") + .unlockedBy("has_diamonds", has(Tags.Items.GEMS_DIAMOND)) + .save(consumer, location(folder + "gold_diamond_chest")); + + ShapedRecipeBuilder.shaped(IronChestsBlocks.OBSIDIAN_CHEST.get()) + .define('M', Blocks.OBSIDIAN) + .define('S', IronChestsBlocks.DIAMOND_CHEST.get()) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_obsidian", has(Blocks.OBSIDIAN)) + .save(consumer, location(folder + "diamond_obsidian_chest")); + + ShapedRecipeBuilder.shaped(IronChestsBlocks.CRYSTAL_CHEST.get()) + .define('G', Tags.Items.GLASS) + .define('S', IronChestsBlocks.DIAMOND_CHEST.get()) + .pattern("GGG") + .pattern("GSG") + .pattern("GGG") + .unlockedBy("has_glass", has(Tags.Items.GLASS)) + .save(consumer, location(folder + "diamond_crystal_chest")); + + ShapedRecipeBuilder.shaped(IronChestsBlocks.DIRT_CHEST.get()) + .define('M', Ingredient.of(Blocks.DIRT, Blocks.COARSE_DIRT, Blocks.PODZOL)) + .define('S', Tags.Items.CHESTS_WOODEN) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_iron_ingot", has(Blocks.DIRT)) + .save(consumer, location(folder + "vanilla_dirt_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_IRON_CHEST.get()) + .requires(IronChestsBlocks.IRON_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_iron_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_GOLD_CHEST.get()) + .requires(IronChestsBlocks.GOLD_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_gold_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_DIAMOND_CHEST.get()) + .requires(IronChestsBlocks.DIAMOND_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_diamond_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_COPPER_CHEST.get()) + .requires(IronChestsBlocks.COPPER_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_copper_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_CRYSTAL_CHEST.get()) + .requires(IronChestsBlocks.CRYSTAL_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_crystal_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_OBSIDIAN_CHEST.get()) + .requires(IronChestsBlocks.OBSIDIAN_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_obsidian_chest")); + + ShapelessRecipeBuilder.shapeless(IronChestsBlocks.TRAPPED_DIRT_CHEST.get()) + .requires(IronChestsBlocks.DIRT_CHEST.get()) + .requires(Blocks.TRIPWIRE_HOOK) + .unlockedBy("has_tripwire_hook", has(Blocks.TRIPWIRE_HOOK)) + .save(consumer, location(folder + "trapped_dirt_chest")); + + ResourceLocation copperToIronChest = location(folder + "copper_iron_chest"); + ConditionalRecipe.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addRecipe(ShapedRecipeBuilder.shaped(IronChestsBlocks.IRON_CHEST.get()) + .define('M', Tags.Items.INGOTS_IRON) + .define('S', IronChestsBlocks.COPPER_CHEST.get()) + .define('G', Tags.Items.GLASS) + .pattern("MGM") + .pattern("GSG") + .pattern("MGM") + .unlockedBy("has_item", has(Tags.Items.INGOTS_IRON))::save) + .setAdvancement(location("recipes/ironchest/chests/copper_iron_chest"), ConditionalAdvancement.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addAdvancement(Advancement.Builder.advancement() + .parent(new ResourceLocation("recipes/root")) + .rewards(AdvancementRewards.Builder.recipe(copperToIronChest)) + .addCriterion("has_item", has(Tags.Items.INGOTS_IRON)) + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(copperToIronChest)) + .requirements(RequirementsStrategy.OR)) + ).build(consumer, copperToIronChest); + + ResourceLocation vanillaToCopperChest = location(folder + "vanilla_copper_chest"); + ConditionalRecipe.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addRecipe(ShapedRecipeBuilder.shaped(IronChestsBlocks.COPPER_CHEST.get()) + .define('M', INGOTS_COPPER) + .define('S', Tags.Items.CHESTS_WOODEN) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_item", has(INGOTS_COPPER))::save) + .setAdvancement(location("recipes/ironchest/chests/vanilla_copper_chest"), ConditionalAdvancement.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addAdvancement(Advancement.Builder.advancement() + .parent(new ResourceLocation("recipes/root")) + .rewards(AdvancementRewards.Builder.recipe(vanillaToCopperChest)) + .addCriterion("has_item", has(INGOTS_COPPER)) + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(vanillaToCopperChest)) + .requirements(RequirementsStrategy.OR)) + ).build(consumer, vanillaToCopperChest); + } + + private void addUpgradesRecipes(Consumer consumer) { + String folder = "upgrades/"; + + ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.WOOD_TO_IRON).get()) + .define('M', Tags.Items.INGOTS_IRON) + .define('P', ItemTags.PLANKS) + .pattern("MMM") + .pattern("MPM") + .pattern("MMM") + .unlockedBy("has_iron_ingot", has(Tags.Items.INGOTS_IRON)) + .save(consumer, prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.WOOD_TO_IRON).get(), folder)); + + ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.IRON_TO_GOLD).get()) + .define('I', Tags.Items.INGOTS_IRON) + .define('G', Tags.Items.INGOTS_GOLD) + .pattern("GGG") + .pattern("GIG") + .pattern("GGG") + .unlockedBy("has_iron_ingot", has(Tags.Items.INGOTS_IRON)) + .save(consumer, prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.IRON_TO_GOLD).get(), folder)); + + ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.GOLD_TO_DIAMOND).get()) + .define('M', Tags.Items.GEMS_DIAMOND) + .define('S', Tags.Items.INGOTS_GOLD) + .define('G', Tags.Items.GLASS) + .pattern("GGG") + .pattern("MSM") + .pattern("GGG") + .unlockedBy("has_glass", has(Tags.Items.GLASS)) + .save(consumer, prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.GOLD_TO_DIAMOND).get(), folder)); + + ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.DIAMOND_TO_OBSIDIAN).get()) + .define('M', Blocks.OBSIDIAN) + .define('G', Tags.Items.GLASS) + .pattern("MMM") + .pattern("MGM") + .pattern("MMM") + .unlockedBy("has_glass", has(Tags.Items.GLASS)) + .save(consumer, prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.DIAMOND_TO_OBSIDIAN).get(), folder)); + + ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.DIAMOND_TO_CRYSTAL).get()) + .define('M', Blocks.OBSIDIAN) + .define('G', Tags.Items.GLASS) + .pattern("GGG") + .pattern("GMG") + .pattern("GGG") + .unlockedBy("has_glass", has(Tags.Items.GLASS)) + .save(consumer, prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.DIAMOND_TO_CRYSTAL).get(), folder)); + + ResourceLocation woodToCopperChestUpgradeId = prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.WOOD_TO_COPPER).get(), folder); + ConditionalRecipe.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addRecipe(ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.WOOD_TO_COPPER).get()) + .define('M', INGOTS_COPPER) + .define('S', ItemTags.PLANKS) + .pattern("MMM") + .pattern("MSM") + .pattern("MMM") + .unlockedBy("has_item", has(ItemTags.PLANKS))::save) + .setAdvancement(location("recipes/ironchest/upgrades/wood_to_copper_chest_upgrade"), ConditionalAdvancement.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addAdvancement(Advancement.Builder.advancement() + .parent(new ResourceLocation("recipes/root")) + .rewards(AdvancementRewards.Builder.recipe(woodToCopperChestUpgradeId)) + .addCriterion("has_item", has(ItemTags.PLANKS)) + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(woodToCopperChestUpgradeId)) + .requirements(RequirementsStrategy.OR)) + ).build(consumer, woodToCopperChestUpgradeId); + + ResourceLocation copperToIronChestUpgrade = prefix(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.COPPER_TO_IRON).get(), folder); + ConditionalRecipe.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addRecipe(ShapedRecipeBuilder.shaped(IronChestsItems.UPGRADES.get(IronChestsUpgradeType.COPPER_TO_IRON).get()) + .define('M', Tags.Items.INGOTS_IRON) + .define('S', INGOTS_COPPER) + .define('G', Tags.Items.GLASS) + .pattern("MGM") + .pattern("GSG") + .pattern("MGM") + .unlockedBy("has_item", has(ItemTags.PLANKS))::save) + .setAdvancement(location("recipes/ironchest/upgrades/copper_to_iron_chest_upgrade"), ConditionalAdvancement.builder() + .addCondition(not(new TagEmptyCondition("forge:ingots/copper"))) + .addAdvancement(Advancement.Builder.advancement() + .parent(new ResourceLocation("recipes/root")) + .rewards(AdvancementRewards.Builder.recipe(copperToIronChestUpgrade)) + .addCriterion("has_item", has(Tags.Items.GLASS)) + .addCriterion("has_the_recipe", RecipeUnlockedTrigger.unlocked(copperToIronChestUpgrade)) + .requirements(RequirementsStrategy.OR)) + ).build(consumer, copperToIronChestUpgrade); + } + + protected static ResourceLocation prefix(ItemLike item, String prefix) { + ResourceLocation loc = Objects.requireNonNull(item.asItem().getRegistryName()); + return location(prefix + loc.getPath()); + } + + private static ResourceLocation location(String id) { + return new ResourceLocation(IronChests.MOD_ID, id); + } + + private static Tags.IOptionalNamedTag tag(String name) { + return ItemTags.createOptional(new ResourceLocation("forge", name)); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/data/package-info.java b/src/main/java/com/progwml6/ironchest/common/data/package-info.java new file mode 100644 index 00000000..6660673e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/data/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.data; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java b/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java new file mode 100644 index 00000000..bc4294c4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.inventory; + +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.Container; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; + +public class DirtChestSlot extends Slot { + + public DirtChestSlot(Container inventoryIn, int slotIndex, int xPosition, int yPosition) { + super(inventoryIn, slotIndex, xPosition, yPosition); + } + + @Override + public boolean mayPlace(ItemStack stack) { + return stack.isEmpty() || stack.getItem() == Item.byBlock(Blocks.DIRT); + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/IronChestMenu.java b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestMenu.java new file mode 100644 index 00000000..be42227a --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestMenu.java @@ -0,0 +1,163 @@ +package com.progwml6.ironchest.common.inventory; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import net.minecraft.world.Container; +import net.minecraft.world.SimpleContainer; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.MenuType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import javax.annotation.Nullable; + +public class IronChestMenu extends AbstractContainerMenu { + + private final Container container; + + private final IronChestsTypes chestType; + + private IronChestMenu(@Nullable MenuType menuType, int containerId, Inventory playerInventory) { + this(menuType, containerId, playerInventory, new SimpleContainer(IronChestsTypes.WOOD.size), IronChestsTypes.WOOD); + } + + public static IronChestMenu createIronContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.IRON_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.IRON.size), IronChestsTypes.IRON); + } + + public static IronChestMenu createIronContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.IRON_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.IRON); + } + + public static IronChestMenu createGoldContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.GOLD_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.GOLD.size), IronChestsTypes.GOLD); + } + + public static IronChestMenu createGoldContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.GOLD_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.GOLD); + } + + public static IronChestMenu createDiamondContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.DIAMOND_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.DIAMOND.size), IronChestsTypes.DIAMOND); + } + + public static IronChestMenu createDiamondContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.DIAMOND_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.DIAMOND); + } + + public static IronChestMenu createCrystalContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.CRYSTAL_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.CRYSTAL.size), IronChestsTypes.CRYSTAL); + } + + public static IronChestMenu createCrystalContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.CRYSTAL_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.CRYSTAL); + } + + public static IronChestMenu createCopperContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.COPPER_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.COPPER.size), IronChestsTypes.COPPER); + } + + public static IronChestMenu createCopperContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.COPPER_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.COPPER); + } + + public static IronChestMenu createObsidianContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.OBSIDIAN.size), IronChestsTypes.OBSIDIAN); + } + + public static IronChestMenu createObsidianContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.OBSIDIAN); + } + + public static IronChestMenu createDirtContainer(int containerId, Inventory playerInventory) { + return new IronChestMenu(IronChestsContainerTypes.DIRT_CHEST.get(), containerId, playerInventory, new SimpleContainer(IronChestsTypes.DIRT.size), IronChestsTypes.DIRT); + } + + public static IronChestMenu createDirtContainer(int containerId, Inventory playerInventory, Container inventory) { + return new IronChestMenu(IronChestsContainerTypes.DIRT_CHEST.get(), containerId, playerInventory, inventory, IronChestsTypes.DIRT); + } + + protected IronChestMenu(@Nullable MenuType menuType, int containerId, Inventory playerInventory, Container inventory, IronChestsTypes chestType) { + super(menuType, containerId); + + checkContainerSize(inventory, chestType.size); + + this.container = inventory; + this.chestType = chestType; + + inventory.startOpen(playerInventory.player); + + if (chestType == IronChestsTypes.DIRT) { + this.addSlot(new DirtChestSlot(inventory, 0, 12 + 4 * 18, 8 + 2 * 18)); + } else { + for (int chestRow = 0; chestRow < chestType.getRowCount(); chestRow++) { + for (int chestCol = 0; chestCol < chestType.rowLength; chestCol++) { + this.addSlot(new Slot(inventory, chestCol + chestRow * chestType.rowLength, 12 + chestCol * 18, 18 + chestRow * 18)); + } + } + } + + int leftCol = (chestType.xSize - 162) / 2 + 1; + + for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) { + for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) { + this.addSlot(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, chestType.ySize - (4 - playerInvRow) * 18 - 10)); + } + + } + + for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) { + this.addSlot(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, chestType.ySize - 24)); + } + } + + @Override + public boolean stillValid(Player player) { + return this.container.stillValid(player); + } + + @Override + public ItemStack quickMoveStack(Player player, int index) { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.slots.get(index); + + if (slot != null && slot.hasItem()) { + ItemStack itemstack1 = slot.getItem(); + itemstack = itemstack1.copy(); + + if (index < this.chestType.size) { + if (!this.moveItemStackTo(itemstack1, this.chestType.size, this.slots.size(), true)) { + return ItemStack.EMPTY; + } + } else if (!this.moveItemStackTo(itemstack1, 0, this.chestType.size, false)) { + return ItemStack.EMPTY; + } + + if (itemstack1.isEmpty()) { + slot.set(ItemStack.EMPTY); + } else { + slot.setChanged(); + } + } + + return itemstack; + } + + @Override + public void removed(Player playerIn) { + super.removed(playerIn); + this.container.stopOpen(playerIn); + } + + public Container getContainer() { + return this.container; + } + + @OnlyIn(Dist.CLIENT) + public IronChestsTypes getChestType() { + return this.chestType; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java new file mode 100644 index 00000000..57721f17 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java @@ -0,0 +1,26 @@ +package com.progwml6.ironchest.common.inventory; + +import com.progwml6.ironchest.IronChests; +import net.minecraft.world.inventory.MenuType; +import net.minecraftforge.fmllegacy.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +public class IronChestsContainerTypes { + + public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, IronChests.MOD_ID); + + public static final RegistryObject> IRON_CHEST = CONTAINERS.register("iron_chest", () -> new MenuType<>(IronChestMenu::createIronContainer)); + + public static final RegistryObject> GOLD_CHEST = CONTAINERS.register("gold_chest", () -> new MenuType<>(IronChestMenu::createGoldContainer)); + + public static final RegistryObject> DIAMOND_CHEST = CONTAINERS.register("diamond_chest", () -> new MenuType<>(IronChestMenu::createDiamondContainer)); + + public static final RegistryObject> CRYSTAL_CHEST = CONTAINERS.register("crystal_chest", () -> new MenuType<>(IronChestMenu::createCrystalContainer)); + + public static final RegistryObject> COPPER_CHEST = CONTAINERS.register("copper_chest", () -> new MenuType<>(IronChestMenu::createCopperContainer)); + + public static final RegistryObject> OBSIDIAN_CHEST = CONTAINERS.register("obsidian_chest", () -> new MenuType<>(IronChestMenu::createObsidianContainer)); + + public static final RegistryObject> DIRT_CHEST = CONTAINERS.register("dirt_chest", () -> new MenuType<>(IronChestMenu::createDirtContainer)); +} diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/package-info.java b/src/main/java/com/progwml6/ironchest/common/inventory/package-info.java new file mode 100644 index 00000000..3dfff890 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.inventory; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java b/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java new file mode 100644 index 00000000..aa65105d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java @@ -0,0 +1,173 @@ +package com.progwml6.ironchest.common.item; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.regular.AbstractIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.AbstractIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.AbstractTrappedIronChestBlockEntity; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.TrappedChestBlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.ChestBlock; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.entity.ChestBlockEntity; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.InteractionResult; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.world.level.Level; + +public class ChestUpgradeItem extends Item { + + private final IronChestsUpgradeType type; + + public ChestUpgradeItem(IronChestsUpgradeType type, Properties properties) { + super(properties); + this.type = type; + } + + @Override + public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext context) { + Player entityPlayer = context.getPlayer(); + BlockPos blockPos = context.getClickedPos(); + Level world = context.getLevel(); + ItemStack itemStack = context.getItemInHand(); + boolean passed = false; + + if (world.isClientSide) { + return InteractionResult.PASS; + } + + if (entityPlayer == null) { + return InteractionResult.PASS; + } + + if (this.type.canUpgrade(IronChestsTypes.WOOD)) { + if (!(world.getBlockState(blockPos).getBlock() instanceof ChestBlock)) { + return InteractionResult.PASS; + } + } else { + for (Block block : IronChestsTypes.get(this.type.source)) { + if (!passed) + passed = world.getBlockState(blockPos).getBlock().defaultBlockState() == block.defaultBlockState(); + } + } + + if (!passed) { + return InteractionResult.PASS; + } + + + BlockEntity tileEntity = world.getBlockEntity(blockPos); + + if (this.type.canUpgrade(IronChestsTypes.WOOD)) { + if (!(tileEntity instanceof ChestBlockEntity)) { + return InteractionResult.PASS; + } + } + + AbstractIronChestBlockEntity newChest = null; + Component customName = null; + NonNullList chestContents = NonNullList.withSize(27, ItemStack.EMPTY); + Direction chestFacing = Direction.NORTH; + BlockState iBlockState = IronChestsBlocks.COPPER_CHEST.get().defaultBlockState(); + + if (tileEntity != null) { + if (tileEntity instanceof AbstractIronChestBlockEntity chest) { + BlockState chestState = world.getBlockState(blockPos); + + if (AbstractIronChestBlockEntity.getOpenCount(world, blockPos) > 0) { + return InteractionResult.PASS; + } + + if (!chest.canOpen(entityPlayer)) { + return InteractionResult.PASS; + } + + boolean trapped = tileEntity instanceof AbstractTrappedIronChestBlockEntity; + + if(trapped) { + iBlockState = IronChestsTypes.get(this.type.target).get(1).defaultBlockState(); + } else { + iBlockState = IronChestsTypes.get(this.type.target).get(0).defaultBlockState(); + } + + chestContents = chest.getItems(); + chestFacing = chestState.getValue(AbstractIronChestBlock.FACING); + customName = chest.getCustomName(); + iBlockState = iBlockState.setValue(AbstractIronChestBlock.FACING, chestFacing); + + newChest = this.type.target.makeEntity(blockPos, iBlockState, trapped); + } else if (tileEntity instanceof ChestBlockEntity chest) { + BlockState chestState = world.getBlockState(blockPos); + chestFacing = chestState.getValue(ChestBlock.FACING); + + if (ChestBlockEntity.getOpenCount(world, blockPos) > 0) { + return InteractionResult.PASS; + } + + if (!chest.canOpen(entityPlayer)) { + return InteractionResult.PASS; + } + + if (!this.type.canUpgrade(IronChestsTypes.WOOD)) { + return InteractionResult.PASS; + } + + chestContents = NonNullList.withSize(chest.getContainerSize(), ItemStack.EMPTY); + + for (int slot = 0; slot < chestContents.size(); slot++) { + chestContents.set(slot, chest.getItem(slot)); + } + + customName = chest.getCustomName(); + + boolean trapped = tileEntity instanceof TrappedChestBlockEntity; + + if(trapped) { + iBlockState = IronChestsTypes.get(this.type.source).get(1).defaultBlockState(); + } else { + iBlockState = IronChestsTypes.get(this.type.source).get(0).defaultBlockState(); + } + + iBlockState = iBlockState.setValue(AbstractIronChestBlock.FACING, chestFacing); + + newChest = this.type.target.makeEntity(blockPos, iBlockState, trapped); + } + } + + if (newChest == null) { + return InteractionResult.PASS; + } + + world.removeBlockEntity(blockPos); + world.removeBlock(blockPos, false); + + world.setBlock(blockPos, iBlockState, 3); + world.setBlockEntity(newChest); + + world.sendBlockUpdated(blockPos, iBlockState, iBlockState, 3); + + BlockEntity tileEntity2 = world.getBlockEntity(blockPos); + + if (tileEntity2 instanceof AbstractIronChestBlockEntity) { + if (customName != null) { + ((AbstractIronChestBlockEntity) tileEntity2).setCustomName(customName); + } + + ((AbstractIronChestBlockEntity) tileEntity2).setItems(chestContents); + } + + if (!entityPlayer.getAbilities().instabuild) { + itemStack.shrink(1); + } + + return InteractionResult.SUCCESS; + } + +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/IronChestBlockItem.java b/src/main/java/com/progwml6/ironchest/common/item/IronChestBlockItem.java new file mode 100644 index 00000000..bacdeb94 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/IronChestBlockItem.java @@ -0,0 +1,85 @@ +package com.progwml6.ironchest.common.item; + +import com.progwml6.ironchest.client.model.inventory.IronChestItemStackRenderer; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.regular.entity.CopperChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.CrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.DirtChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.GoldChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.IronChestBlockEntity; +import com.progwml6.ironchest.common.block.regular.entity.ObsidianChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCopperChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedCrystalChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDiamondChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedDirtChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedGoldChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedIronChestBlockEntity; +import com.progwml6.ironchest.common.block.trapped.entity.TrappedObsidianChestBlockEntity; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer; +import net.minecraft.core.BlockPos; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.IItemRenderProperties; +import net.minecraftforge.fml.DistExecutor; + +import java.util.concurrent.Callable; +import java.util.function.Consumer; +import java.util.function.Supplier; + +public class IronChestBlockItem extends BlockItem { + + protected Supplier type; + + protected Supplier trapped; + + public IronChestBlockItem(Block block, Properties properties, Supplier> type, Supplier> trapped) { + super(block, properties); + + IronChestsTypes tempType = DistExecutor.callWhenOn(Dist.CLIENT, type); + Boolean tempTrapped = DistExecutor.callWhenOn(Dist.CLIENT, trapped); + + this.type = tempType == null ? null : () -> tempType; + this.trapped = tempTrapped == null ? null : () -> tempTrapped; + } + + @Override + public void initializeClient(Consumer consumer) { + super.initializeClient(consumer); + + consumer.accept(new IItemRenderProperties() { + @Override + public BlockEntityWithoutLevelRenderer getItemStackRenderer() { + Supplier modelToUse; + + if (trapped.get()) { + switch (type.get()) { + case GOLD -> modelToUse = () -> new TrappedGoldChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_GOLD_CHEST.get().defaultBlockState()); + case DIAMOND -> modelToUse = () -> new TrappedDiamondChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_DIAMOND_CHEST.get().defaultBlockState()); + case COPPER -> modelToUse = () -> new TrappedCopperChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_COPPER_CHEST.get().defaultBlockState()); + case CRYSTAL -> modelToUse = () -> new TrappedCrystalChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_CRYSTAL_CHEST.get().defaultBlockState()); + case OBSIDIAN -> modelToUse = () -> new TrappedObsidianChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_OBSIDIAN_CHEST.get().defaultBlockState()); + case DIRT -> modelToUse = () -> new TrappedDirtChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_DIRT_CHEST.get().defaultBlockState()); + default -> modelToUse = () -> new TrappedIronChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.TRAPPED_IRON_CHEST.get().defaultBlockState()); + } + } else { + switch (type.get()) { + case GOLD -> modelToUse = () -> new GoldChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.GOLD_CHEST.get().defaultBlockState()); + case DIAMOND -> modelToUse = () -> new DiamondChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.DIAMOND_CHEST.get().defaultBlockState()); + case COPPER -> modelToUse = () -> new CopperChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.COPPER_CHEST.get().defaultBlockState()); + case CRYSTAL -> modelToUse = () -> new CrystalChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.CRYSTAL_CHEST.get().defaultBlockState()); + case OBSIDIAN -> modelToUse = () -> new ObsidianChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.OBSIDIAN_CHEST.get().defaultBlockState()); + case DIRT -> modelToUse = () -> new DirtChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.DIRT_CHEST.get().defaultBlockState()); + default -> modelToUse = () -> new IronChestBlockEntity(BlockPos.ZERO, IronChestsBlocks.IRON_CHEST.get().defaultBlockState()); + } + } + + return new IronChestItemStackRenderer(Minecraft.getInstance().getBlockEntityRenderDispatcher(), Minecraft.getInstance().getEntityModels(), modelToUse); + } + }); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java b/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java new file mode 100644 index 00000000..5bd40f12 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java @@ -0,0 +1,27 @@ +package com.progwml6.ironchest.common.item; + +import com.google.common.collect.ImmutableMap; +import com.progwml6.ironchest.IronChests; +import net.minecraft.world.item.Item; +import net.minecraftforge.fmllegacy.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.Arrays; +import java.util.Locale; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +public class IronChestsItems { + + public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, IronChests.MOD_ID); + + public static final ImmutableMap> UPGRADES = ImmutableMap.copyOf(Arrays.stream(IronChestsUpgradeType.values()) + .collect(Collectors.toMap(Function.identity(), type -> register(type.name().toLowerCase(Locale.ROOT) + "_chest_upgrade", + () -> new ChestUpgradeItem(type, new Item.Properties().tab(IronChests.IRONCHESTS_ITEM_GROUP).stacksTo(1)))))); + + private static RegistryObject register(final String name, final Supplier sup) { + return ITEMS.register(name, sup); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java b/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java new file mode 100644 index 00000000..898ead09 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java @@ -0,0 +1,37 @@ +package com.progwml6.ironchest.common.item; + +import com.progwml6.ironchest.common.Util; +import com.progwml6.ironchest.common.block.IronChestsTypes; + +import static com.progwml6.ironchest.common.block.IronChestsTypes.COPPER; +import static com.progwml6.ironchest.common.block.IronChestsTypes.CRYSTAL; +import static com.progwml6.ironchest.common.block.IronChestsTypes.DIAMOND; +import static com.progwml6.ironchest.common.block.IronChestsTypes.GOLD; +import static com.progwml6.ironchest.common.block.IronChestsTypes.IRON; +import static com.progwml6.ironchest.common.block.IronChestsTypes.OBSIDIAN; +import static com.progwml6.ironchest.common.block.IronChestsTypes.WOOD; + +public enum IronChestsUpgradeType { + + IRON_TO_GOLD(IRON, GOLD), + GOLD_TO_DIAMOND(GOLD, DIAMOND), + COPPER_TO_IRON(COPPER, IRON), + DIAMOND_TO_CRYSTAL(DIAMOND, CRYSTAL), + WOOD_TO_IRON(WOOD, IRON), + WOOD_TO_COPPER(WOOD, COPPER), + DIAMOND_TO_OBSIDIAN(DIAMOND, OBSIDIAN); + + public final String name; + public final IronChestsTypes source; + public final IronChestsTypes target; + + IronChestsUpgradeType(IronChestsTypes source, IronChestsTypes target) { + this.name = Util.toEnglishName(this.name()); + this.source = source; + this.target = target; + } + + public boolean canUpgrade(IronChestsTypes from) { + return from == this.source; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/package-info.java b/src/main/java/com/progwml6/ironchest/common/item/package-info.java new file mode 100644 index 00000000..037c3d9e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.item; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/network/InventoryTopStacksSyncPacket.java b/src/main/java/com/progwml6/ironchest/common/network/InventoryTopStacksSyncPacket.java new file mode 100644 index 00000000..ce6741a3 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/InventoryTopStacksSyncPacket.java @@ -0,0 +1,76 @@ +package com.progwml6.ironchest.common.network; + +import com.progwml6.ironchest.common.block.entity.ICrystalChest; +import com.progwml6.ironchest.common.network.helper.IThreadsafePacket; +import net.minecraft.client.Minecraft; +import net.minecraft.world.item.ItemStack; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.core.NonNullList; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraftforge.fmllegacy.network.NetworkEvent; + +public class InventoryTopStacksSyncPacket implements IThreadsafePacket { + + private final BlockPos pos; + private final NonNullList topStacks; + + public InventoryTopStacksSyncPacket(NonNullList topStacks, BlockPos pos) { + this.topStacks = topStacks; + this.pos = pos; + } + + public InventoryTopStacksSyncPacket(FriendlyByteBuf buffer) { + int size = buffer.readInt(); + NonNullList topStacks = NonNullList.withSize(size, ItemStack.EMPTY); + + for (int item = 0; item < size; item++) { + ItemStack itemStack = buffer.readItem(); + + topStacks.set(item, itemStack); + } + + this.topStacks = topStacks; + + this.pos = buffer.readBlockPos(); + } + + @Override + public void encode(FriendlyByteBuf packetBuffer) { + packetBuffer.writeInt(this.topStacks.size()); + + for (ItemStack stack : this.topStacks) { + packetBuffer.writeItem(stack); + } + + packetBuffer.writeBlockPos(this.pos); + } + + @Override + public void handleThreadsafe(NetworkEvent.Context context) { + HandleClient.handle(this); + } + + /** + * Safely runs client side only code in a method only called on client + */ + private static class HandleClient { + + private static void handle(InventoryTopStacksSyncPacket packet) { + Level world = Minecraft.getInstance().level; + + if (world != null) { + BlockEntity te = world.getBlockEntity(packet.pos); + + if (te != null) { + if (te instanceof ICrystalChest) { + ((ICrystalChest) te).receiveMessageFromServer(packet.topStacks); + + Minecraft.getInstance().levelRenderer.blockChanged(null, packet.pos, null, null, 0); + } + } + } + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/network/IronChestNetwork.java b/src/main/java/com/progwml6/ironchest/common/network/IronChestNetwork.java new file mode 100644 index 00000000..207002f4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/IronChestNetwork.java @@ -0,0 +1,193 @@ +package com.progwml6.ironchest.common.network; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.network.helper.ISimplePacket; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.chunk.LevelChunk; +import net.minecraft.server.level.ServerLevel; +import net.minecraftforge.common.util.FakePlayer; +import net.minecraftforge.fmllegacy.network.NetworkDirection; +import net.minecraftforge.fmllegacy.network.NetworkEvent; +import net.minecraftforge.fmllegacy.network.NetworkRegistry; +import net.minecraftforge.fmllegacy.network.PacketDistributor; +import net.minecraftforge.fmllegacy.network.simple.SimpleChannel; + +import javax.annotation.Nullable; +import java.util.Optional; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.Supplier; + +public class IronChestNetwork { + + private static IronChestNetwork instance = null; + + public final SimpleChannel network; + private int id = 0; + private static final String PROTOCOL_VERSION = Integer.toString(1); + + public IronChestNetwork() { + this.network = NetworkRegistry.ChannelBuilder.named(new ResourceLocation(IronChests.MOD_ID, "network")) + .clientAcceptedVersions(PROTOCOL_VERSION::equals) + .serverAcceptedVersions(PROTOCOL_VERSION::equals) + .networkProtocolVersion(() -> PROTOCOL_VERSION) + .simpleChannel(); + } + + /** + * Gets the instance of the network + */ + public static IronChestNetwork getInstance() { + if (instance == null) { + throw new IllegalStateException("Attempt to call network getInstance before network is setup"); + } + + return instance; + } + + /** + * Called during mod construction to setup the network + */ + public static void setup() { + if (instance != null) { + return; + } + + instance = new IronChestNetwork(); + instance.registerPacket(InventoryTopStacksSyncPacket.class, InventoryTopStacksSyncPacket::new, NetworkDirection.PLAY_TO_CLIENT); + } + + /** + * Registers a new {@link ISimplePacket} + * + * @param clazz Packet class + * @param decoder Packet decoder, typically the constructor + * @param Packet class type + */ + public void registerPacket(Class clazz, Function decoder, @Nullable NetworkDirection direction) { + registerPacket(clazz, ISimplePacket::encode, decoder, ISimplePacket::handle, direction); + } + + /** + * Registers a new generic packet + * + * @param clazz Packet class + * @param encoder Encodes a packet to the buffer + * @param decoder Packet decoder, typically the constructor + * @param consumer Logic to handle a packet + * @param direction Network direction for validation. Pass null for no direction + * @param Packet class type + */ + public void registerPacket(Class clazz, BiConsumer encoder, Function decoder, BiConsumer> consumer, @Nullable NetworkDirection direction) { + this.network.registerMessage(this.id++, clazz, encoder, decoder, consumer, Optional.ofNullable(direction)); + } + + /* Sending packets */ + + /** + * Sends a packet to the server + * + * @param msg Packet to send + */ + public void sendToServer(Object msg) { + this.network.sendToServer(msg); + } + + /** + * Sends a packet to the given packet distributor + * + * @param target Packet target + * @param message Packet to send + */ + public void send(PacketDistributor.PacketTarget target, Object message) { + network.send(target, message); + } + + /** + * Sends a vanilla packet to the given entity + * + * @param player Player receiving the packet + * @param packet Packet + */ + public void sendVanillaPacket(Packet packet, Entity player) { + if (player instanceof ServerPlayer && ((ServerPlayer) player).connection != null) { + ((ServerPlayer) player).connection.send(packet); + } + } + + /** + * Sends a packet to a player + * + * @param msg Packet + * @param player Player to send + */ + public void sendTo(Object msg, Player player) { + if (player instanceof ServerPlayer) { + sendTo(msg, (ServerPlayer) player); + } + } + + /** + * Sends a packet to a player + * + * @param msg Packet + * @param player Player to send + */ + public void sendTo(Object msg, ServerPlayer player) { + if (!(player instanceof FakePlayer)) { + network.sendTo(msg, player.connection.connection, NetworkDirection.PLAY_TO_CLIENT); + } + } + + /** + * Sends a packet to players near a location + * + * @param msg Packet to send + * @param serverWorld World instance + * @param position Position within range + */ + public void sendToClientsAround(Object msg, ServerLevel serverWorld, BlockPos position) { + LevelChunk chunk = serverWorld.getChunkAt(position); + network.send(PacketDistributor.TRACKING_CHUNK.with(() -> chunk), msg); + } + + /** + * Sends a packet to all entities tracking the given entity + * + * @param msg Packet + * @param entity Entity to check + */ + public void sendToTrackingAndSelf(Object msg, Entity entity) { + this.network.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), msg); + } + + /** + * Sends a packet to all entities tracking the given entity + * + * @param msg Packet + * @param entity Entity to check + */ + public void sendToTracking(Object msg, Entity entity) { + this.network.send(PacketDistributor.TRACKING_ENTITY.with(() -> entity), msg); + } + + /** + * Same as {@link #sendToClientsAround(Object, ServerLevel, BlockPos)}, but checks that the world is a level accessor + * + * @param msg Packet to send + * @param world World instance + * @param position Target position + */ + public void sendToClientsAround(Object msg, @Nullable LevelAccessor world, BlockPos position) { + if (world instanceof ServerLevel) { + sendToClientsAround(msg, (ServerLevel) world, position); + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/network/helper/ISimplePacket.java b/src/main/java/com/progwml6/ironchest/common/network/helper/ISimplePacket.java new file mode 100644 index 00000000..a2411d3e --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/helper/ISimplePacket.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.common.network.helper; + +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.fmllegacy.network.NetworkEvent; + +import java.util.function.Supplier; + +/** + * Packet interface to add common methods for registration + */ +public interface ISimplePacket { + /** + * Encodes a packet for the buffer + * @param buf Buffer instance + */ + void encode(FriendlyByteBuf buf); + + /** + * Handles receiving the packet + * @param context Packet context + */ + void handle(Supplier context); +} diff --git a/src/main/java/com/progwml6/ironchest/common/network/helper/IThreadsafePacket.java b/src/main/java/com/progwml6/ironchest/common/network/helper/IThreadsafePacket.java new file mode 100644 index 00000000..fa7ad062 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/helper/IThreadsafePacket.java @@ -0,0 +1,26 @@ +package com.progwml6.ironchest.common.network.helper; + +import net.minecraftforge.fmllegacy.network.NetworkEvent; + +import java.util.function.Supplier; + +/** + * Packet instance that automatically wraps the logic in {@link NetworkEvent.Context#enqueueWork(Runnable)} for thread safety + */ +public interface IThreadsafePacket extends ISimplePacket { + + @Override + default void handle(Supplier supplier) { + NetworkEvent.Context context = supplier.get(); + context.enqueueWork(() -> handleThreadsafe(context)); + context.setPacketHandled(true); + } + + /** + * Handles receiving the packet on the correct thread + * Packet is automatically set to handled as well by the base logic + * + * @param context Packet context + */ + void handleThreadsafe(NetworkEvent.Context context); +} diff --git a/src/main/java/com/progwml6/ironchest/common/network/helper/package-info.java b/src/main/java/com/progwml6/ironchest/common/network/helper/package-info.java new file mode 100644 index 00000000..4aa5f077 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/helper/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.network.helper; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/network/package-info.java b/src/main/java/com/progwml6/ironchest/common/network/package-info.java new file mode 100644 index 00000000..0c75c7ef --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/network/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common.network; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/common/package-info.java b/src/main/java/com/progwml6/ironchest/common/package-info.java new file mode 100644 index 00000000..1ed6007d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest.common; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/com/progwml6/ironchest/package-info.java b/src/main/java/com/progwml6/ironchest/package-info.java new file mode 100644 index 00000000..567fa08d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/package-info.java @@ -0,0 +1,7 @@ +@ParametersAreNonnullByDefault +@MethodsReturnNonnullByDefault +package com.progwml6.ironchest; + +import net.minecraft.MethodsReturnNonnullByDefault; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/cpw/mods/ironchest/BlockIronChest.java b/src/main/java/cpw/mods/ironchest/BlockIronChest.java deleted file mode 100755 index adb8fb5a..00000000 --- a/src/main/java/cpw/mods/ironchest/BlockIronChest.java +++ /dev/null @@ -1,295 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -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.properties.IProperty; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockState; -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.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import com.google.common.collect.Lists; - -public class BlockIronChest extends BlockContainer -{ - public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class); - - public BlockIronChest() - { - super(Material.iron); - - this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON)); - - this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - this.setHardness(3.0F); - this.setUnlocalizedName("IronChest"); - this.setCreativeTab(CreativeTabs.tabDecorations); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean isFullCube() - { - return false; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState blockState, EntityPlayer player, EnumFacing direction, float p_180639_6_, float p_180639_7_, float p_180639_8_) - { - TileEntity te = world.getTileEntity(pos); - - if (te == null || !(te instanceof TileEntityIronChest)) - { - return true; - } - - if (world.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN)) - { - return true; - } - - if (world.isRemote) - { - return true; - } - - player.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - return true; - } - - @Override - public TileEntity createNewTileEntity(World world, int metadata) - { - return IronChestType.makeEntity(metadata); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) - { - for (IronChestType type : IronChestType.values()) - { - if (type.isValidForCreativeMode()) - { - list.add(new ItemStack(itemIn, 1, type.ordinal())); - } - } - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState().withProperty(VARIANT_PROP, IronChestType.values()[meta]); - } - - @Override - public int getMetaFromState(IBlockState blockState) - { - return ((IronChestType) blockState.getValue(VARIANT_PROP)).ordinal(); - } - - @Override - protected BlockState createBlockState() - { - return new BlockState(this, new IProperty[] { VARIANT_PROP }); - } - - @Override - public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) - { - ArrayList items = Lists.newArrayList(); - ItemStack stack = new ItemStack(this, 1, getMetaFromState(state)); - IronChestType.values()[IronChestType.validateMeta(getMetaFromState(state))].adornItemDrop(stack); - items.add(stack); - return items; - } - - @Override - public void onBlockAdded(World world, BlockPos pos, IBlockState blockState) - { - super.onBlockAdded(world, pos, blockState); - world.markBlockForUpdate(pos); - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack) - { - byte chestFacing = 0; - int facing = MathHelper.floor_double((entityliving.rotationYaw * 4F) / 360F + 0.5D) & 3; - if (facing == 0) - { - chestFacing = 2; - } - if (facing == 1) - { - chestFacing = 5; - } - if (facing == 2) - { - chestFacing = 3; - } - if (facing == 3) - { - chestFacing = 4; - } - TileEntity te = world.getTileEntity(pos); - if (te != null && te instanceof TileEntityIronChest) - { - TileEntityIronChest teic = (TileEntityIronChest) te; - teic.wasPlaced(entityliving, itemStack); - teic.setFacing(chestFacing); - world.markBlockForUpdate(pos); - } - } - - @Override - public int damageDropped(IBlockState state) - { - return IronChestType.validateMeta(((IronChestType) state.getValue(VARIANT_PROP)).ordinal()); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState blockState) - { - TileEntityIronChest tileentitychest = (TileEntityIronChest) world.getTileEntity(pos); - if (tileentitychest != null) - { - tileentitychest.removeAdornments(); - dropContent(0, tileentitychest, world, tileentitychest.getPos()); - } - super.breakBlock(world, pos, blockState); - } - - public void dropContent(int newSize, IInventory chest, World world, BlockPos pos) - { - Random random = world.rand; - - for (int l = newSize; l < chest.getSizeInventory(); l++) - { - ItemStack itemstack = chest.getStackInSlot(l); - if (itemstack == null) - { - continue; - } - float f = random.nextFloat() * 0.8F + 0.1F; - float f1 = random.nextFloat() * 0.8F + 0.1F; - float f2 = random.nextFloat() * 0.8F + 0.1F; - while (itemstack.stackSize > 0) - { - int i1 = random.nextInt(21) + 10; - if (i1 > itemstack.stackSize) - { - i1 = itemstack.stackSize; - } - itemstack.stackSize -= i1; - EntityItem entityitem = new EntityItem(world, pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, pos.getZ() + f2, new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata())); - float f3 = 0.05F; - entityitem.motionX = (float) random.nextGaussian() * f3; - entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float) random.nextGaussian() * f3; - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); - } - world.spawnEntityInWorld(entityitem); - } - } - } - - @Override - public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion) - { - TileEntity te = world.getTileEntity(pos); - if (te instanceof TileEntityIronChest) - { - TileEntityIronChest teic = (TileEntityIronChest) te; - if (teic.getType().isExplosionResistant()) - { - return 10000F; - } - } - return super.getExplosionResistance(world, pos, exploder, explosion); - } - - @Override - public boolean hasComparatorInputOverride() - { - return true; - } - - @Override - public int getComparatorInputOverride(World world, BlockPos pos) - { - TileEntity te = world.getTileEntity(pos); - if (te instanceof IInventory) - { - return Container.calcRedstoneFromInventory((IInventory) te); - } - return 0; - } - - private static final EnumFacing[] validRotationAxes = new EnumFacing[] { EnumFacing.UP, EnumFacing.DOWN }; - - @Override - public EnumFacing[] getValidRotations(World worldObj, BlockPos pos) - { - return validRotationAxes; - } - - @Override - public boolean rotateBlock(World worldObj, BlockPos pos, EnumFacing axis) - { - if (worldObj.isRemote) - { - return false; - } - if (axis == EnumFacing.UP || axis == EnumFacing.DOWN) - { - TileEntity tileEntity = worldObj.getTileEntity(pos); - if (tileEntity instanceof TileEntityIronChest) - { - TileEntityIronChest icte = (TileEntityIronChest) tileEntity; - icte.rotateAround(); - } - return true; - } - return false; - } -} \ No newline at end of file diff --git a/src/main/java/cpw/mods/ironchest/ChestChangerType.java b/src/main/java/cpw/mods/ironchest/ChestChangerType.java deleted file mode 100755 index c4a1f0c5..00000000 --- a/src/main/java/cpw/mods/ironchest/ChestChangerType.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * Contributors: cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import static cpw.mods.ironchest.IronChestType.COPPER; -import static cpw.mods.ironchest.IronChestType.CRYSTAL; -import static cpw.mods.ironchest.IronChestType.DIAMOND; -import static cpw.mods.ironchest.IronChestType.GOLD; -import static cpw.mods.ironchest.IronChestType.IRON; -import static cpw.mods.ironchest.IronChestType.OBSIDIAN; -import static cpw.mods.ironchest.IronChestType.SILVER; -import static cpw.mods.ironchest.IronChestType.WOOD; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.registry.GameRegistry; -import cpw.mods.ironchest.client.ModelHelper; -import net.minecraftforge.fml.relauncher.Side; - -public enum ChestChangerType { - IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"), - GOLDDIAMOND(GOLD, DIAMOND, "goldDiamondUpgrade", "Gold to Diamond Chest Upgrade", "GGG", "msm", "GGG"), - COPPERSILVER(COPPER, SILVER, "copperSilverUpgrade", "Copper to Silver Chest Upgrade", "mmm", "msm", "mmm"), - SILVERGOLD(SILVER, GOLD, "silverGoldUpgrade", "Silver to Gold Chest Upgrade", "mGm", "GsG", "mGm"), - COPPERIRON(COPPER, IRON, "copperIronUpgrade", "Copper to Iron Chest Upgrade", "mGm", "GsG", "mGm"), - DIAMONDCRYSTAL(DIAMOND, CRYSTAL, "diamondCrystalUpgrade", "Diamond to Crystal Chest Upgrade", "GGG", "GOG", "GGG"), - WOODIRON(WOOD, IRON, "woodIronUpgrade", "Normal chest to Iron Chest Upgrade", "mmm", "msm", "mmm"), - WOODCOPPER(WOOD, COPPER, "woodCopperUpgrade", "Normal chest to Copper Chest Upgrade", "mmm", "msm", "mmm"), - DIAMONDOBSIDIAN(DIAMOND, OBSIDIAN, "diamondObsidianUpgrade", "Diamond to Obsidian Chest Upgrade", "mmm", "mGm", "mmm"); - - private IronChestType source; - private IronChestType target; - public String itemName; - public String descriptiveName; - public ItemChestChanger item; - private String[] recipe; - - private ChestChangerType(IronChestType source, IronChestType target, String itemName, String descriptiveName, String... recipe) - { - this.source = source; - this.target = target; - this.itemName = itemName; - this.descriptiveName = descriptiveName; - this.recipe = recipe; - } - - public IronChestType getSource(){ - return source; - } - - public boolean canUpgrade(IronChestType from) - { - return from == this.source; - } - - public int getTarget() - { - return this.target.ordinal(); - } - - public ItemChestChanger buildItem() - { - item = new ItemChestChanger(this); - GameRegistry.registerItem(item, itemName); - if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - ModelHelper.registerItem(item, "ironchest:" + itemName); - return item; - } - - public void addRecipes() - { - for (String sourceMat : source.getMatList()) - { - for (String targetMat : target.getMatList()) - { - Object targetMaterial = IronChestType.translateOreName(targetMat); - Object sourceMaterial = IronChestType.translateOreName(sourceMat); - IronChestType.addRecipe(new ItemStack(item), recipe, 'm', targetMaterial, 's', sourceMaterial, 'G', "blockGlass", 'O', Blocks.obsidian); - } - } - } - - public static void buildItems() - { - for (ChestChangerType type : values()) - { - type.buildItem(); - } - } - - public static void generateRecipes() - { - for (ChestChangerType item : values()) - { - item.addRecipes(); - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/CommonProxy.java b/src/main/java/cpw/mods/ironchest/CommonProxy.java deleted file mode 100755 index bad478b1..00000000 --- a/src/main/java/cpw/mods/ironchest/CommonProxy.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.network.IGuiHandler; - -public class CommonProxy implements IGuiHandler { - public void registerRenderInformation() - { - - } - - public void registerTileEntitySpecialRenderer(Class typ) - { - - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - return null; - } - - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); - if (te != null && te instanceof TileEntityIronChest) - { - TileEntityIronChest icte = (TileEntityIronChest) te; - return new ContainerIronChest(player.inventory, icte, icte.getType(), 0, 0); - } - else - { - return null; - } - } - - public World getClientWorld() - { - return null; - } - -} diff --git a/src/main/java/cpw/mods/ironchest/ContainerIronChest.java b/src/main/java/cpw/mods/ironchest/ContainerIronChest.java deleted file mode 100755 index c5f4904d..00000000 --- a/src/main/java/cpw/mods/ironchest/ContainerIronChest.java +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -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 ContainerIronChest extends Container { - private IronChestType type; - private EntityPlayer player; - private IInventory chest; - - public ContainerIronChest(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize) - { - chest = chestInventory; - player = ((InventoryPlayer) playerInventory).player; - this.type = type; - chestInventory.openInventory(player); - layoutContainer(playerInventory, chestInventory, type, xSize, ySize); - } - - @Override - public boolean canInteractWith(EntityPlayer player) - { - return chest.isUseableByPlayer(player); - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer p, int i) - { - ItemStack itemstack = null; - Slot slot = (Slot) inventorySlots.get(i); - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - if (i < type.size) - { - if (!mergeItemStack(itemstack1, type.size, inventorySlots.size(), true)) - { - return null; - } - } - else if (!type.acceptsStack(itemstack1)) - { - return null; - } - else if (!mergeItemStack(itemstack1, 0, type.size, false)) - { - return null; - } - if (itemstack1.stackSize == 0) - { - slot.putStack(null); - } - else - { - slot.onSlotChanged(); - } - } - return itemstack; - } - - @Override - public void onContainerClosed(EntityPlayer entityplayer) - { - super.onContainerClosed(entityplayer); - chest.closeInventory(entityplayer); - } - - protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize) - { - if (type == IronChestType.DIRTCHEST9000) { - addSlotToContainer(type.makeSlot(chestInventory, 0, 12 + 4 * 18, 8 + 2 * 18)); - } else { - for (int chestRow = 0; chestRow < type.getRowCount(); chestRow++) - { - for (int chestCol = 0; chestCol < type.getRowLength(); chestCol++) - { - addSlotToContainer(type.makeSlot(chestInventory, chestCol + chestRow * type.getRowLength(), 12 + chestCol * 18, 8 + chestRow * 18)); - } - } - } - - int leftCol = (xSize - 162) / 2 + 1; - for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) - { - for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) - { - addSlotToContainer(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, ySize - (4 - playerInvRow) * 18 - - 10)); - } - - } - - for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) - { - addSlotToContainer(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, ySize - 24)); - } - } - - public EntityPlayer getPlayer() - { - return player; - } - - public int getNumColumns() { - return type.getRowLength(); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChest.java b/src/main/java/cpw/mods/ironchest/IronChest.java deleted file mode 100755 index 9898ce72..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChest.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import io.netty.buffer.ByteBuf; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderFireball; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.Mod.Instance; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -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.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; - -@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[11.15.0,12.0]", acceptedMinecraftVersions="[1.8,1.8.9]") -public class IronChest -{ - public static BlockIronChest ironChestBlock; - @SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy") - public static CommonProxy proxy; - @Instance("IronChest") - public static IronChest instance; - - @EventHandler - public void preInit(FMLPreInitializationEvent event) - { - Version.init(event.getVersionProperties()); - event.getModMetadata().version = Version.fullVersionString(); - } - - @EventHandler - public void load(FMLInitializationEvent evt) - { - // Registration has been moved to init to account for the registration of inventory models - // Minecraft.getRenderItem() returns null before this stage - ChestChangerType.buildItems(); - ironChestBlock = new BlockIronChest(); - GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest"); - - for (IronChestType typ : IronChestType.values()) - { - GameRegistry.registerTileEntityWithAlternatives(typ.clazz, "IronChest." + typ.name(), typ.name()); - proxy.registerTileEntitySpecialRenderer(typ.clazz); - } - IronChestType.registerBlocksAndRecipes(ironChestBlock); - ChestChangerType.generateRecipes(); - NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); - proxy.registerRenderInformation(); - MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler()); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java b/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java deleted file mode 100755 index a34ca279..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java +++ /dev/null @@ -1,24 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.entity.ai.EntityAIOcelotSit; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public class IronChestAIOcelotSit extends EntityAIOcelotSit -{ - public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2) - { - super(par1EntityOcelot, par2); - } - - @Override - protected boolean shouldMoveTo(World world, BlockPos pos) - { - if (world.getBlockState(pos).getBlock() == IronChest.ironChestBlock) - { - return true; - } - return super.shouldMoveTo(world, pos); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChestType.java b/src/main/java/cpw/mods/ironchest/IronChestType.java deleted file mode 100755 index 6dd83b3a..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChestType.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagByte; -import net.minecraft.util.IStringSerializable; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.ShapedOreRecipe; - -public enum IronChestType implements IStringSerializable -{ - IRON(54, 9, true, "Iron Chest", "ironchest.png", 0, Arrays.asList("ingotIron", "ingotRefinedIron"), TileEntityIronChest.class, "mmmmPmmmm", "mGmG3GmGm"), - GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"), - DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"), - COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"), - SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"), - CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"), - OBSIDIAN(108, 12, false, "Obsidian Chest", "obsidianchest.png", 6, Arrays.asList("obsidian"), TileEntityObsidianChest.class, "mmmm2mmmm"), - DIRTCHEST9000(1, 1, false, "Dirt Chest 9000", "dirtchest.png",7,Arrays.asList("dirt"), TileEntityDirtChest.class,Item.getItemFromBlock(Blocks.dirt),"mmmmCmmmm"), - WOOD(0, 0, false, "", "", -1, Arrays.asList("plankWood"), null); - int size; - private int rowLength; - public String friendlyName; - private boolean tieredChest; - private String modelTexture; - private int textureRow; - public Class clazz; - private String[] recipes; - private ArrayList matList; - private Item itemFilter; - - IronChestType(int size, int rowLength, boolean tieredChest, String friendlyName, String modelTexture, int textureRow, List mats, - Class clazz, String... recipes) - { - this(size, rowLength, tieredChest, friendlyName, modelTexture, textureRow, mats, clazz, (Item)null, recipes); - } - IronChestType(int size, int rowLength, boolean tieredChest, String friendlyName, String modelTexture, int textureRow, List mats, - Class clazz, Item itemFilter, String... recipes) - { - this.size = size; - this.rowLength = rowLength; - this.tieredChest = tieredChest; - this.friendlyName = friendlyName; - this.modelTexture = modelTexture; - this.textureRow = textureRow; - this.clazz = clazz; - this.itemFilter = itemFilter; - this.recipes = recipes; - this.matList = new ArrayList(); - matList.addAll(mats); - } - - @Override - public String getName() - { - return name().toLowerCase(); - } - - public String getModelTexture() - { - return modelTexture; - } - - public int getTextureRow() - { - return textureRow; - } - - public static TileEntityIronChest makeEntity(int metadata) - { - // Compatibility - int chesttype = validateMeta(metadata); - if (chesttype == metadata) - { - try - { - TileEntityIronChest te = values()[chesttype].clazz.newInstance(); - return te; - } - catch (InstantiationException e) - { - // unpossible - e.printStackTrace(); - } - catch (IllegalAccessException e) - { - // unpossible - e.printStackTrace(); - } - } - return null; - } - - public static void registerBlocksAndRecipes(BlockIronChest blockResult) - { - Object previous = "chestWood"; - for (IronChestType typ : values()) - { - generateRecipesForType(blockResult, previous, typ); - ItemStack chest = new ItemStack(blockResult, 1, typ.ordinal()); - //if (typ.isValidForCreativeMode()) GameRegistry.registerCustomItemStack(typ.friendlyName, chest);//TODO fix this!! - if (typ.tieredChest) previous = chest; - } - } - - public static void generateRecipesForType(BlockIronChest blockResult, Object previousTier, IronChestType type) - { - for (String recipe : type.recipes) - { - String[] recipeSplit = new String[] { recipe.substring(0, 3), recipe.substring(3, 6), recipe.substring(6, 9) }; - Object mainMaterial = null; - for (String mat : type.matList) - { - mainMaterial = translateOreName(mat); - addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit, - 'm', mainMaterial, 'P', previousTier, /* previous tier of chest */ - 'G', "blockGlass", 'C', "chestWood", - '0', new ItemStack(blockResult, 1, 0), /* Iron Chest */ - '1', new ItemStack(blockResult, 1, 1), /* Gold Chest */ - '2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */ - '3', new ItemStack(blockResult, 1, 3), /* Copper Chest */ - '4', new ItemStack(blockResult, 1, 4) /* Silver Chest */ - ); - } - } - } - - public static Object translateOreName(String mat) - { - if (mat.equals("obsidian")) - { - return Blocks.obsidian; - } - else if (mat.equals("dirt")) - { - return Blocks.dirt; - } - return mat; - } - - public static void addRecipe(ItemStack is, Object... parts) - { - ShapedOreRecipe oreRecipe = new ShapedOreRecipe(is, parts); - GameRegistry.addRecipe(oreRecipe); - } - - public int getRowCount() - { - return size / rowLength; - } - - public int getRowLength() - { - return rowLength; - } - - public boolean isTransparent() - { - return this == CRYSTAL; - } - - public List getMatList() - { - return matList; - } - - public static int validateMeta(int i) - { - if (i < values().length && values()[i].size > 0) - { - return i; - } - else - { - return 0; - } - } - - public boolean isValidForCreativeMode() - { - return validateMeta(ordinal()) == ordinal(); - } - - public boolean isExplosionResistant() - { - return this == OBSIDIAN; - } - - public Slot makeSlot(IInventory chestInventory, int index, int x, int y) - { - return new ValidatingSlot(chestInventory, index, x, y, this); - } - - public boolean acceptsStack(ItemStack itemstack) - { - return itemFilter == null || itemstack == null || itemstack.getItem() == itemFilter; - } - - public void adornItemDrop(ItemStack item) - { - if (this == DIRTCHEST9000) - { - item.setTagInfo("dirtchest", new NBTTagByte((byte) 1)); - } - } -} \ No newline at end of file diff --git a/src/main/java/cpw/mods/ironchest/ItemChestChanger.java b/src/main/java/cpw/mods/ironchest/ItemChestChanger.java deleted file mode 100755 index b080f890..00000000 --- a/src/main/java/cpw/mods/ironchest/ItemChestChanger.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.block.BlockChest; -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.tileentity.TileEntityChest; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class ItemChestChanger extends Item -{ - private ChestChangerType type; - - public ItemChestChanger(ChestChangerType type) - { - this.type = type; - - this.setMaxStackSize(1); - this.setUnlocalizedName("ironchest:" + type.name()); - this.setCreativeTab(CreativeTabs.tabMisc); - } - - @Override - public boolean onItemUseFirst (ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - return false; - if(this.type.canUpgrade(IronChestType.WOOD)){ - if(!(world.getBlockState(pos).getBlock() instanceof BlockChest)){ - return false; - } - }else{ - if(world.getBlockState(pos) != IronChest.ironChestBlock.getStateFromMeta(IronChestType.valueOf(type.getSource().getName().toUpperCase()).ordinal())){ - return false; - } - } - TileEntity te = world.getTileEntity(pos); - TileEntityIronChest newchest = new TileEntityIronChest(); - ItemStack[] chestContents = new ItemStack[27]; - if (te != null) - { - if (te instanceof TileEntityIronChest) - { - chestContents = ((TileEntityIronChest) te).chestContents; - newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal())); - if (newchest == null) - return false; - } - else if (te instanceof TileEntityChest) - { - if (((TileEntityChest) te).numPlayersUsing > 0) - return false; - if (!getType().canUpgrade(IronChestType.WOOD)) - return false; - chestContents = new ItemStack[((TileEntityChest) te).getSizeInventory()]; - for (int i = 0; i < chestContents.length; i++) - chestContents[i] = ((TileEntityChest) te).getStackInSlot(i); - newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal())); - } - } - - te.updateContainingBlockInfo(); - if (te instanceof TileEntityChest) - ((TileEntityChest) te).checkForAdjacentChests(); - - world.removeTileEntity(pos); - world.setBlockToAir(pos); - - world.setTileEntity(pos, newchest); - world.setBlockState(pos, IronChest.ironChestBlock.getStateFromMeta(newchest.getType().ordinal()), 3); - - world.markBlockForUpdate(pos); - - TileEntity te2 = world.getTileEntity(pos); - if (te2 instanceof TileEntityIronChest) - { - ((TileEntityIronChest) te2).setContents(chestContents); - } - - stack.stackSize = player.capabilities.isCreativeMode ? stack.stackSize : stack.stackSize - 1; - return true; - } - - public int getTargetChestOrdinal(int sourceOrdinal) - { - return type.getTarget(); - } - - public ChestChangerType getType() - { - return type; - } -} diff --git a/src/main/java/cpw/mods/ironchest/ItemIronChest.java b/src/main/java/cpw/mods/ironchest/ItemIronChest.java deleted file mode 100755 index 4b3f8410..00000000 --- a/src/main/java/cpw/mods/ironchest/ItemIronChest.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemIronChest extends ItemBlock -{ - public ItemIronChest(Block block) - { - super(block); - - this.setMaxDamage(0); - this.setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return IronChestType.validateMeta(meta); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - return "tile.ironchest:" + IronChestType.values()[itemstack.getMetadata()].name(); - } -} diff --git a/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java b/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java deleted file mode 100755 index f5c5b783..00000000 --- a/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package cpw.mods.ironchest; - -import java.util.List; - -import net.minecraft.entity.ai.EntityAIOcelotSit; -import net.minecraft.entity.ai.EntityAITasks; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - -public class OcelotsSitOnChestsHandler { - - @SubscribeEvent - public void changeSittingTaskForOcelots(LivingEvent.LivingUpdateEvent evt) - { - if (evt.entityLiving.ticksExisted < 5 && evt.entityLiving instanceof EntityOcelot) - { - EntityOcelot ocelot = (EntityOcelot) evt.entityLiving; - List tasks = ocelot.tasks.taskEntries; - - for (EntityAITasks.EntityAITaskEntry task : tasks) { - if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit)) { - task.action = new IronChestAIOcelotSit(ocelot, 0.4F); - } - } - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java b/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java deleted file mode 100755 index f8ececfe..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityCopperChest extends TileEntityIronChest { - public TileEntityCopperChest() - { - super(IronChestType.COPPER); - } - -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java b/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java deleted file mode 100755 index 24288ec9..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityCrystalChest extends TileEntityIronChest { - public TileEntityCrystalChest() - { - super(IronChestType.CRYSTAL); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java b/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java deleted file mode 100755 index 84b90237..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityDiamondChest extends TileEntityIronChest -{ - public TileEntityDiamondChest() - { - super(IronChestType.DIAMOND); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java b/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java deleted file mode 100755 index a7608c07..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java +++ /dev/null @@ -1,42 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.StatCollector; - -public class TileEntityDirtChest extends TileEntityIronChest { - private static ItemStack dirtChest9000GuideBook = new ItemStack(Items.written_book); - static { - dirtChest9000GuideBook.setTagInfo("author", new NBTTagString("cpw")); - dirtChest9000GuideBook.setTagInfo("title", new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.title"))); - NBTTagList pages = new NBTTagList(); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page1"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page2"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page3"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page4"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page5"))); - dirtChest9000GuideBook.setTagInfo("pages", pages); - } - public TileEntityDirtChest() { - super(IronChestType.DIRTCHEST9000); - } - - @Override - public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack) - { - if (!(itemStack.hasTagCompound() && itemStack.getTagCompound().getBoolean("dirtchest"))) { - setInventorySlotContents(0, dirtChest9000GuideBook.copy()); - } - } - - @Override - public void removeAdornments() - { - if (chestContents[0] != null && chestContents[0].isItemEqual(dirtChest9000GuideBook)) { - chestContents[0] = null; - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java b/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java deleted file mode 100755 index fc531e29..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityGoldChest extends TileEntityIronChest { - - public TileEntityGoldChest() - { - super(IronChestType.GOLD); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java b/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java deleted file mode 100755 index 2504b31b..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java +++ /dev/null @@ -1,609 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -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.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntityLockable; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraftforge.common.util.Constants; - -public class TileEntityIronChest extends TileEntityLockable implements ITickable, IInventory -{ - private int ticksSinceSync = -1; - public float prevLidAngle; - public float lidAngle; - private int numUsingPlayers; - private IronChestType type; - public ItemStack[] chestContents; - private ItemStack[] topStacks; - private byte facing; - private boolean inventoryTouched; - private boolean hadStuff; - private String customName; - - public TileEntityIronChest() - { - this(IronChestType.IRON); - } - - protected TileEntityIronChest(IronChestType type) - { - super(); - this.type = type; - this.chestContents = new ItemStack[getSizeInventory()]; - this.topStacks = new ItemStack[8]; - } - - public ItemStack[] getContents() - { - return chestContents; - } - - public void setContents(ItemStack[] contents) - { - chestContents = new ItemStack[getSizeInventory()]; - for (int i = 0; i < contents.length; i++) - { - if (i < chestContents.length) - { - chestContents[i] = contents[i]; - } - } - inventoryTouched = true; - } - - @Override - public int getSizeInventory() - { - return type.size; - } - - public int getFacing() - { - return this.facing; - } - - public IronChestType getType() - { - return type; - } - - @Override - public ItemStack getStackInSlot(int i) - { - inventoryTouched = true; - return chestContents[i]; - } - - @Override - public void markDirty() - { - super.markDirty(); - sortTopStacks(); - } - - protected void sortTopStacks() - { - if (!type.isTransparent() || (worldObj != null && worldObj.isRemote)) - { - return; - } - ItemStack[] tempCopy = new ItemStack[getSizeInventory()]; - boolean hasStuff = false; - int compressedIdx = 0; - mainLoop: for (int i = 0; i < getSizeInventory(); i++) - { - if (chestContents[i] != null) - { - for (int j = 0; j < compressedIdx; j++) - { - if (tempCopy[j].isItemEqual(chestContents[i])) - { - tempCopy[j].stackSize += chestContents[i].stackSize; - continue mainLoop; - } - } - tempCopy[compressedIdx++] = chestContents[i].copy(); - hasStuff = true; - } - } - if (!hasStuff && hadStuff) - { - hadStuff = false; - for (int i = 0; i < topStacks.length; i++) - { - topStacks[i] = null; - } - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - return; - } - hadStuff = true; - Arrays.sort(tempCopy, new Comparator() - { - @Override - public int compare(ItemStack o1, ItemStack o2) - { - if (o1 == null) - { - return 1; - } else if (o2 == null) - { - return -1; - } else - { - return o2.stackSize - o1.stackSize; - } - } - }); - int p = 0; - for (int i = 0; i < tempCopy.length; i++) - { - if (tempCopy[i] != null && tempCopy[i].stackSize > 0) - { - topStacks[p++] = tempCopy[i]; - if (p == topStacks.length) - { - break; - } - } - } - for (int i = p; i < topStacks.length; i++) - { - topStacks[i] = null; - } - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - - @Override - public ItemStack decrStackSize(int i, int j) - { - if (chestContents[i] != null) - { - if (chestContents[i].stackSize <= j) - { - ItemStack itemstack = chestContents[i]; - chestContents[i] = null; - markDirty(); - return itemstack; - } - ItemStack itemstack1 = chestContents[i].splitStack(j); - if (chestContents[i].stackSize == 0) - { - chestContents[i] = null; - } - markDirty(); - return itemstack1; - } else - { - return null; - } - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) - { - chestContents[i] = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - } - markDirty(); - } - - @Override - public String getName() - { - return this.hasCustomName() ? this.customName : type.name(); - } - - @Override - public boolean hasCustomName() - { - return this.customName != null && this.customName.length() > 0; - } - - public void setCustomName(String name) - { - this.customName = name; - } - - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) - { - super.readFromNBT(nbttagcompound); - - NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND); - this.chestContents = new ItemStack[getSizeInventory()]; - - if (nbttagcompound.hasKey("CustomName", Constants.NBT.TAG_STRING)) - { - this.customName = nbttagcompound.getString("CustomName"); - } - - for (int i = 0; i < nbttaglist.tagCount(); i++) - { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - int j = nbttagcompound1.getByte("Slot") & 0xff; - if (j >= 0 && j < chestContents.length) - { - chestContents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - facing = nbttagcompound.getByte("facing"); - sortTopStacks(); - } - - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) - { - super.writeToNBT(nbttagcompound); - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < chestContents.length; i++) - { - if (chestContents[i] != null) - { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - chestContents[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - - nbttagcompound.setTag("Items", nbttaglist); - nbttagcompound.setByte("facing", facing); - - if (this.hasCustomName()) - { - nbttagcompound.setString("CustomName", this.customName); - } - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) - { - if (worldObj == null) - { - return true; - } - if (worldObj.getTileEntity(pos) != this) - { - return false; - } - return entityplayer.getDistanceSq(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D) <= 64D; - } - - @Override - public void update() - { - // Resynchronize clients with the server state - if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + pos.getX() + pos.getY() + pos.getZ()) % 200 == 0) - { - this.numUsingPlayers = 0; - float var1 = 5.0F; - List var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.getX() - var1, pos.getY() - var1, pos.getZ() - var1, pos.getX() + 1 + var1, pos.getY() + 1 + var1, pos.getZ() + 1 + var1)); - - for (EntityPlayer var4 : var2) - { - if (var4.openContainer instanceof ContainerIronChest) - { - ++this.numUsingPlayers; - } - } - } - - if (worldObj != null && !worldObj.isRemote && ticksSinceSync < 0) - { - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 3, ((numUsingPlayers << 3) & 0xF8) | (facing & 0x7)); - } - if (!worldObj.isRemote && inventoryTouched) - { - inventoryTouched = false; - sortTopStacks(); - } - - this.ticksSinceSync++; - prevLidAngle = lidAngle; - float f = 0.1F; - if (numUsingPlayers > 0 && lidAngle == 0.0F) - { - double d = pos.getX() + 0.5D; - double d1 = pos.getZ() + 0.5D; - worldObj.playSoundEffect(d, pos.getY() + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - if (numUsingPlayers == 0 && lidAngle > 0.0F || numUsingPlayers > 0 && lidAngle < 1.0F) - { - float f1 = lidAngle; - if (numUsingPlayers > 0) - { - lidAngle += f; - } else - { - lidAngle -= f; - } - if (lidAngle > 1.0F) - { - lidAngle = 1.0F; - } - float f2 = 0.5F; - if (lidAngle < f2 && f1 >= f2) - { - double d2 = pos.getX() + 0.5D; - double d3 = pos.getZ() + 0.5D; - worldObj.playSoundEffect(d2, pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - if (lidAngle < 0.0F) - { - lidAngle = 0.0F; - } - } - } - - @Override - public boolean receiveClientEvent(int i, int j) - { - if (i == 1) - { - numUsingPlayers = j; - } else if (i == 2) - { - facing = (byte) j; - } else if (i == 3) - { - facing = (byte) (j & 0x7); - numUsingPlayers = (j & 0xF8) >> 3; - } - return true; - } - - @Override - public void openInventory(EntityPlayer player) - { - if (worldObj == null) - { - return; - } - numUsingPlayers++; - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers); - } - - @Override - public void closeInventory(EntityPlayer player) - { - if (worldObj == null) - { - return; - } - numUsingPlayers--; - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers); - } - - public void setFacing(byte facing2) - { - this.facing = facing2; - } - - public ItemStack[] getTopItemStacks() - { - return topStacks; - } - - public TileEntityIronChest updateFromMetadata(int l) - { - if (worldObj != null && worldObj.isRemote) - { - if (l != type.ordinal()) - { - worldObj.setTileEntity(pos, IronChestType.makeEntity(l)); - return (TileEntityIronChest) worldObj.getTileEntity(pos); - } - } - return this; - } - - @Override - public Packet getDescriptionPacket() - { - - NBTTagCompound nbt = new NBTTagCompound(); - nbt.setInteger("type", getType().ordinal()); - nbt.setByte("facing", facing); - ItemStack[] stacks = buildItemStackDataList(); - if (stacks != null) - { - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < stacks.length; i++) - { - if (stacks[i] != null) - { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - stacks[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - nbt.setTag("stacks", nbttaglist); - } - - return new S35PacketUpdateTileEntity(pos, 0, nbt); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) - { - if (pkt.getTileEntityType() == 0) - { - NBTTagCompound nbt = pkt.getNbtCompound(); - type = IronChestType.values()[nbt.getInteger("type")]; - facing = nbt.getByte("facing"); - - NBTTagList tagList = nbt.getTagList("stacks", Constants.NBT.TAG_COMPOUND); - ItemStack[] stacks = new ItemStack[topStacks.length]; - - for (int i = 0; i < stacks.length; i++) - { - NBTTagCompound nbt1 = tagList.getCompoundTagAt(i); - int j = nbt1.getByte("Slot") & 0xff; - if (j >= 0 && j < stacks.length) - { - stacks[j] = ItemStack.loadItemStackFromNBT(nbt1); - } - } - - if (type.isTransparent() && stacks != null) - { - int pos = 0; - for (int i = 0; i < topStacks.length; i++) - { - if (stacks[pos] != null) - { - topStacks[i] = stacks[pos]; - } else - { - topStacks[i] = null; - } - pos++; - } - } - } - } - - public ItemStack[] buildItemStackDataList() - { - if (type.isTransparent()) - { - ItemStack[] sortList = new ItemStack[topStacks.length]; - int pos = 0; - for (ItemStack is : topStacks) - { - if (is != null) - { - sortList[pos++] = is; - } else - { - sortList[pos++] = null; - } - } - return sortList; - } - return null; - } - - @Override - public ItemStack removeStackFromSlot(int par1) - { - if (this.chestContents[par1] != null) - { - ItemStack var2 = this.chestContents[par1]; - this.chestContents[par1] = null; - return var2; - } else - { - return null; - } - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) - { - return type.acceptsStack(itemstack); - } - - public void rotateAround() - { - facing++; - if (facing > EnumFacing.EAST.ordinal()) - { - facing = (byte) EnumFacing.NORTH.ordinal(); - } - setFacing(facing); - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 2, facing); - } - - public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack) - { - } - - public void removeAdornments() - { - } - - @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() - { - for (int i = 0; i < this.chestContents.length; ++i) - { - this.chestContents[i] = null; - } - } - - @Override - public Container createContainer(InventoryPlayer playerInventory, EntityPlayer player) - { - return null; - } - - @Override - public String getGuiID() - { - return "IronChest:" + type.name(); - } - - @Override - public boolean canRenderBreaking() - { - return true; - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java b/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java deleted file mode 100755 index 5f03eb94..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java +++ /dev/null @@ -1,9 +0,0 @@ -package cpw.mods.ironchest; - -public class TileEntityObsidianChest extends TileEntityIronChest { - - public TileEntityObsidianChest() - { - super(IronChestType.OBSIDIAN); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java b/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java deleted file mode 100755 index 439d2667..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntitySilverChest extends TileEntityIronChest { - public TileEntitySilverChest() - { - super(IronChestType.SILVER); - } -} diff --git a/src/main/java/cpw/mods/ironchest/ValidatingSlot.java b/src/main/java/cpw/mods/ironchest/ValidatingSlot.java deleted file mode 100755 index f0348c97..00000000 --- a/src/main/java/cpw/mods/ironchest/ValidatingSlot.java +++ /dev/null @@ -1,21 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ValidatingSlot extends Slot { - private IronChestType type; - - public ValidatingSlot(IInventory par1iInventory, int par2, int par3, int par4, IronChestType type) - { - super(par1iInventory, par2, par3, par4); - this.type = type; - } - - @Override - public boolean isItemValid(ItemStack par1ItemStack) - { - return type.acceptsStack(par1ItemStack); - } -} diff --git a/src/main/java/cpw/mods/ironchest/Version.java b/src/main/java/cpw/mods/ironchest/Version.java deleted file mode 100755 index f155473d..00000000 --- a/src/main/java/cpw/mods/ironchest/Version.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * Contributors: cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.Properties; - -public class Version -{ - private static String major; - private static String minor; - private static String rev; - private static String build; - @SuppressWarnings("unused") - private static String mcversion; - - static void init(Properties properties) - { - if (properties != null) - { - major = properties.getProperty("IronChest.build.major.number"); - minor = properties.getProperty("IronChest.build.minor.number"); - rev = properties.getProperty("IronChest.build.revision.number"); - build = properties.getProperty("IronChest.build.number"); - mcversion = properties.getProperty("IronChest.build.mcversion"); - } - } - - public static String fullVersionString() - { - return String.format("%s.%s.%s build %s", major, minor, rev, build); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/ClientProxy.java b/src/main/java/cpw/mods/ironchest/client/ClientProxy.java deleted file mode 100755 index 8872b760..00000000 --- a/src/main/java/cpw/mods/ironchest/client/ClientProxy.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemModelMesher; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import cpw.mods.ironchest.CommonProxy; -import cpw.mods.ironchest.IronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; - -public class ClientProxy extends CommonProxy -{ - @Override - public void registerRenderInformation() - { - Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(IronChest.ironChestBlock); - - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - for (IronChestType chestType : IronChestType.values()) - { - if (chestType != IronChestType.WOOD) - { - Item chestItem = Item.getItemFromBlock(IronChest.ironChestBlock); - mesher.register(chestItem, chestType.ordinal(), new ModelResourceLocation("ironchest:chest_" + chestType.getName().toLowerCase(), "inventory")); - ModelBakery.addVariantName(chestItem, "ironchest:chest_" + chestType.getName().toLowerCase()); - } - } - } - - @Override - public void registerTileEntitySpecialRenderer(Class type) - { - ClientRegistry.bindTileEntitySpecialRenderer(type, new TileEntityIronChestRenderer(type)); - } - - @Override - public World getClientWorld() - { - return FMLClientHandler.instance().getClient().theWorld; - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); - if (te != null && te instanceof TileEntityIronChest) - { - return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te); - } else - { - return null; - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/GUIChest.java b/src/main/java/cpw/mods/ironchest/client/GUIChest.java deleted file mode 100755 index 345791b8..00000000 --- a/src/main/java/cpw/mods/ironchest/client/GUIChest.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.ironchest.ContainerIronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; - -public class GUIChest extends GuiContainer { - public enum ResourceList { - IRON(new ResourceLocation("ironchest", "textures/gui/ironcontainer.png")), - COPPER(new ResourceLocation("ironchest", "textures/gui/coppercontainer.png")), - SILVER(new ResourceLocation("ironchest", "textures/gui/silvercontainer.png")), - GOLD(new ResourceLocation("ironchest", "textures/gui/goldcontainer.png")), - DIAMOND(new ResourceLocation("ironchest", "textures/gui/diamondcontainer.png")), - DIRT(new ResourceLocation("ironchest", "textures/gui/dirtcontainer.png")); - public final ResourceLocation location; - private ResourceList(ResourceLocation loc) { - this.location = loc; - } - } - public enum GUI { - IRON(184, 202, ResourceList.IRON, IronChestType.IRON), - GOLD(184, 256, ResourceList.GOLD, IronChestType.GOLD), - DIAMOND(238, 256, ResourceList.DIAMOND, IronChestType.DIAMOND), - COPPER(184, 184, ResourceList.COPPER, IronChestType.COPPER), - SILVER(184, 238, ResourceList.SILVER, IronChestType.SILVER), - CRYSTAL(238, 256, ResourceList.DIAMOND, IronChestType.CRYSTAL), - OBSIDIAN(238, 256, ResourceList.DIAMOND, IronChestType.OBSIDIAN), - DIRTCHEST9000(184, 184, ResourceList.DIRT, IronChestType.DIRTCHEST9000); - - private int xSize; - private int ySize; - private ResourceList guiResourceList; - private IronChestType mainType; - - private GUI(int xSize, int ySize, ResourceList guiResourceList, IronChestType mainType) - { - this.xSize = xSize; - this.ySize = ySize; - this.guiResourceList = guiResourceList; - this.mainType = mainType; - - } - - protected Container makeContainer(IInventory player, IInventory chest) - { - return new ContainerIronChest(player, chest, mainType, xSize, ySize); - } - - public static GUIChest buildGUI(IronChestType type, IInventory playerInventory, TileEntityIronChest chestInventory) - { - return new GUIChest(values()[chestInventory.getType().ordinal()], playerInventory, chestInventory); - } - } - - public int getRowLength() - { - return type.mainType.getRowLength(); - } - - private GUI type; - - private GUIChest(GUI type, IInventory player, IInventory chest) - { - super(type.makeContainer(player, chest)); - this.type = type; - this.xSize = type.xSize; - this.ySize = type.ySize; - this.allowUserInput = false; - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - // new "bind tex" - this.mc.getTextureManager().bindTexture(type.guiResourceList.location); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/ModelHelper.java b/src/main/java/cpw/mods/ironchest/client/ModelHelper.java deleted file mode 100644 index 9fb7a35c..00000000 --- a/src/main/java/cpw/mods/ironchest/client/ModelHelper.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemModelMesher; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelHelper -{ - public static void registerItem(Item item, int metadata, String itemName) - { - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - mesher.register(item, metadata, new ModelResourceLocation(itemName, "inventory")); - } - - public static void registerBlock(Block block, int metadata, String blockName) - { - registerItem(Item.getItemFromBlock(block), metadata, blockName); - } - - public static void registerBlock(Block block, String blockName) - { - registerBlock(block, 0, blockName); - } - - public static void registerItem(Item item, String itemName) - { - registerItem(item, 0, itemName); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java b/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java deleted file mode 100755 index b9940fdc..00000000 --- a/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import java.util.Map; -import java.util.Random; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; -import com.google.common.primitives.SignedBytes; - -import cpw.mods.ironchest.BlockIronChest; -import cpw.mods.ironchest.IronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelChest; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderEntityItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer -{ - private static Map locations; - - static { - Builder builder = ImmutableMap.builder(); - for (IronChestType typ : IronChestType.values()) { - builder.put(typ, new ResourceLocation("ironchest","textures/model/"+typ.getModelTexture())); - } - locations = builder.build(); - } - - private Random random; - private RenderEntityItem itemRenderer; - private ModelChest model; - - private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F }, - { 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, }; - - public TileEntityIronChestRenderer(Class type) - { - model = new ModelChest(); - random = new Random(); - itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()){ - @Override - public int func_177078_a(ItemStack stack) { - return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1); - } - @Override - public boolean shouldBob() { - return false; - } - @Override - public boolean shouldSpreadItems() { - return false; - } - }; - } - - public void render(TileEntityIronChest tile, double x, double y, double z, float partialTick, int breakStage) - { - if (tile == null) { - return; - } - int facing = 3; - IronChestType type = tile.getType(); - - if (tile != null && tile.hasWorldObj() && tile.getWorld().getBlockState(tile.getPos()).getBlock() == IronChest.ironChestBlock) { - facing = tile.getFacing(); - type = tile.getType(); - IBlockState state = tile.getWorld().getBlockState(tile.getPos()); - type = (IronChestType)state.getValue(BlockIronChest.VARIANT_PROP); - } - - if (breakStage >= 0) - { - bindTexture(DESTROY_STAGES[breakStage]); - GlStateManager.matrixMode(5890); - GlStateManager.pushMatrix(); - GlStateManager.scale(4.0F, 4.0F, 1.0F); - GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); - GlStateManager.matrixMode(5888); - } else - bindTexture(locations.get(type)); - GlStateManager.pushMatrix(); - if(type == IronChestType.CRYSTAL) - GlStateManager.disableCull(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F); - GlStateManager.scale(1.0F, -1F, -1F); - GlStateManager.translate(0.5F, 0.5F, 0.5F); - int k = 0; - if (facing == 2) { - k = 180; - } - if (facing == 3) { - k = 0; - } - if (facing == 4) { - k = 90; - } - if (facing == 5) { - k = -90; - } - GlStateManager.rotate(k, 0.0F, 1.0F, 0.0F); - GlStateManager.translate(-0.5F, -0.5F, -0.5F); - float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick; - lidangle = 1.0F - lidangle; - lidangle = 1.0F - lidangle * lidangle * lidangle; - model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F); - // Render the chest itself - model.renderAll(); - if (breakStage >= 0) - { - GlStateManager.matrixMode(5890); - GlStateManager.popMatrix(); - GlStateManager.matrixMode(5888); - } - if(type == IronChestType.CRYSTAL) - GlStateManager.enableCull(); - GlStateManager.popMatrix(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - - if (type.isTransparent() && tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d) { - random.setSeed(254L); - float shiftX; - float shiftY; - float shiftZ; - int shift = 0; - float blockScale = 0.70F; - float timeD = (float) (360.0 * (double) (System.currentTimeMillis() & 0x3FFFL) / (double) 0x3FFFL); - if (tile.getTopItemStacks()[1] == null) { - shift = 8; - blockScale = 0.85F; - } - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - EntityItem customitem = new EntityItem(this.getWorld()); - customitem.hoverStart = 0f; - for (ItemStack item : tile.getTopItemStacks()) { - if (shift > shifts.length) { - break; - } - if (item == null) { - shift++; - continue; - } - shiftX = shifts[shift][0]; - shiftY = shifts[shift][1]; - shiftZ = shifts[shift][2]; - shift++; - GlStateManager.pushMatrix(); - GlStateManager.translate(shiftX, shiftY, shiftZ); - GlStateManager.rotate(timeD, 0.0F, 1.0F, 0.0F); - GlStateManager.scale(blockScale, blockScale, blockScale); - customitem.setEntityItemStack(item); - itemRenderer.doRender(customitem, 0, 0, 0, 0, 0); - GlStateManager.popMatrix(); - } - GlStateManager.popMatrix(); - } - } - - public void renderTileEntityAt(TileEntityIronChest tileentity, double x, double y, double z, float partialTick, int breakStage) - { - render(tileentity, x, y, z, partialTick, breakStage); - } -} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 00000000..69a84656 --- /dev/null +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1 @@ +public net.minecraft.world.entity.ai.goal.GoalSelector f_25345_ # goals \ 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..af1978bf --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,30 @@ +modLoader="javafml" +loaderVersion="${loader_range}" +issueTrackerURL="https://github.com/progwml6/ironchest/issues" +license="GNU General Public License v3.0" + +[[mods]] + modId="ironchest" + namespace="ironchest" + version="${version}" + displayName="Iron Chests" + authors="cpw, alexbegt, progwml6" + description=''' +New chests with larger sizes, with in-place upgrade items. +The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest + ''' + displayURL="https://minecraft.curseforge.com/projects/iron-chests" + +[[dependencies.ironchest]] + modId="forge" + mandatory=true + versionRange="${forge_range}" + ordering="NONE" + side="BOTH" + +[[dependencies.ironchest]] + modId="minecraft" + mandatory=true + versionRange="${minecraft_range}" + ordering="NONE" + side="BOTH" diff --git a/src/main/resources/assets/ironchest/blockstates/copper_chest.json b/src/main/resources/assets/ironchest/blockstates/copper_chest.json new file mode 100644 index 00000000..f765c301 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/copper_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/copper_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/crystal_chest.json b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json new file mode 100644 index 00000000..93583504 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/crystal_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/diamond_chest.json b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json new file mode 100644 index 00000000..eb4f51b0 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/diamond_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/dirt_chest.json b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json new file mode 100644 index 00000000..1d032052 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/dirt_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/gold_chest.json b/src/main/resources/assets/ironchest/blockstates/gold_chest.json new file mode 100644 index 00000000..1f782cbd --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/gold_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/gold_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/iron_chest.json b/src/main/resources/assets/ironchest/blockstates/iron_chest.json new file mode 100644 index 00000000..56834a37 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/iron_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/iron_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json new file mode 100644 index 00000000..6a846038 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/obsidian_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_copper_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_copper_chest.json new file mode 100644 index 00000000..39099299 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_copper_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_copper_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_crystal_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_crystal_chest.json new file mode 100644 index 00000000..4ce07c0b --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_crystal_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_crystal_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_diamond_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_diamond_chest.json new file mode 100644 index 00000000..2d698f93 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_diamond_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_diamond_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_dirt_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_dirt_chest.json new file mode 100644 index 00000000..349d752d --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_dirt_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_dirt_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_gold_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_gold_chest.json new file mode 100644 index 00000000..8a52f565 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_gold_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_gold_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_iron_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_iron_chest.json new file mode 100644 index 00000000..4f932624 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_iron_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_iron_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/trapped_obsidian_chest.json b/src/main/resources/assets/ironchest/blockstates/trapped_obsidian_chest.json new file mode 100644 index 00000000..925651d7 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/trapped_obsidian_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/trapped_obsidian_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/lang/cs_CZ.lang b/src/main/resources/assets/ironchest/lang/cs_CZ.lang deleted file mode 100755 index a202085b..00000000 --- a/src/main/resources/assets/ironchest/lang/cs_CZ.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Železná truhla -tile.ironchest:GOLD.name=Zlatá truhla -tile.ironchest:DIAMOND.name=Diamantová truhla -tile.ironchest:COPPER.name=MÄ›dÄ›ná truhla -tile.ironchest:SILVER.name=Stříbrná truhla -tile.ironchest:CRYSTAL.name=Krystalová truhla -tile.ironchest:OBSIDIAN.name=Obsidiánová truhla - -item.ironchest:IRONGOLD.name=VylepÅ¡ení železné truhly na zlatou -item.ironchest:GOLDDIAMOND.name=VylepÅ¡ení zlaté truhly na diamantovou -item.ironchest:COPPERSILVER.name=VylepÅ¡ení mÄ›dÄ›né truhly na stříbrnou -item.ironchest:SILVERGOLD.name=VylepÅ¡ení stříbrné truhly na zlatou -item.ironchest:COPPERIRON.name=VylepÅ¡ení mÄ›dÄ›né truhly na železnou -item.ironchest:DIAMONDCRYSTAL.name=VylepÅ¡ení diamantové truhly na krystalovou -item.ironchest:WOODIRON.name=VylepÅ¡ení dÅ™evÄ›né truhly na železnou -item.ironchest:WOODCOPPER.name=VylepÅ¡ení dÅ™evÄ›né truhly na mÄ›dÄ›nou -item.ironchest:DIAMONDOBSIDIAN.name=VylepÅ¡ení diamantové truhly na obsidiánovou diff --git a/src/main/resources/assets/ironchest/lang/da_DK.lang b/src/main/resources/assets/ironchest/lang/da_DK.lang deleted file mode 100755 index 7e40e342..00000000 --- a/src/main/resources/assets/ironchest/lang/da_DK.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Jern Kiste -tile.ironchest:GOLD.name=Guld Kiste -tile.ironchest:DIAMOND.name=Diamant Kiste -tile.ironchest:COPPER.name=Kobber Kiste -tile.ironchest:SILVER.name=Sølv Kiste -tile.ironchest:CRYSTAL.name=Krystal Kiste -tile.ironchest:OBSIDIAN.name=Obsidian Kiste - -item.ironchest:IRONGOLD.name=Jern til Guld Kiste Opgradering -item.ironchest:GOLDDIAMOND.name=Guld til Diamant Kiste Opgradering -item.ironchest:COPPERSILVER.name=Kobber til Sølv Kiste Opgradering -item.ironchest:SILVERGOLD.name=Sølv til Guld Kiste Opgradering -item.ironchest:COPPERIRON.name=Kobber til Jern Kiste Opgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant til Krystal Kiste Opgradering -item.ironchest:WOODIRON.name=Træ til Jern Kiste Opgradering -item.ironchest:WOODCOPPER.name=Træ til Kobber Kiste Opgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant til Obsidian Kiste Opgradering diff --git a/src/main/resources/assets/ironchest/lang/de_DE.lang b/src/main/resources/assets/ironchest/lang/de_DE.lang deleted file mode 100755 index fd6c4037..00000000 --- a/src/main/resources/assets/ironchest/lang/de_DE.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Eisentruhe -tile.ironchest:GOLD.name=Goldtruhe -tile.ironchest:DIAMOND.name=Diamanttruhe -tile.ironchest:COPPER.name=Kupfertruhe -tile.ironchest:SILVER.name=Silbertruhe -tile.ironchest:CRYSTAL.name=Kristalltruhe -tile.ironchest:OBSIDIAN.name=Obsidiantruhe -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Eisen-zu-Goldtruhen-Upgrade -item.ironchest:GOLDDIAMOND.name=Gold-zu-Diamanttruhen-Upgrade -item.ironchest:COPPERSILVER.name=Kupfer-zu-Silbertruhen-Upgrade -item.ironchest:SILVERGOLD.name=Silber-zu-Goldtruhen-Upgrade -item.ironchest:COPPERIRON.name=Kupfer-zu-Eisentruhen-Upgrade -item.ironchest:DIAMONDCRYSTAL.name=Diamant-zu-Kristalltruhen-Upgrade -item.ironchest:WOODIRON.name=Holz-zu-Eisentruhen-Upgrade -item.ironchest:WOODCOPPER.name=Holz-zu-Kupfertruhen-Upgrade -item.ironchest:DIAMONDOBSIDIAN.name=Diamant-zu-Obsidiantruhen-Upgrade - -book.ironchest:dirtchest9000.title=Wie du deine neue DirtChest 9000 nutzt! -book.ironchest:dirtchest9000.page1=Willkommen zu Ihrer neuen DirtChest 9000! Wir hoffen, dass Sie viele freudige Jahre genießen werden, wenn Sie Ihre Erd-Stacks in unserem nützlichen Speichergerät lagern. -book.ironchest:dirtchest9000.page2=Nutzung: Werfen Sie einfach den Erd-Stack Ihrer Wahl in den äußerst rezeptiven Slot und genießen Sie die Annehmlichkeit, diese Erde für Sie verfügbar zu haben, jedes mal, wenn Sie diese Truhe passieren! -book.ironchest:dirtchest9000.page3=Wir hoffen, Sie haben das Durchgehen dieser Bedienungsanleitung genossen, und hoffen, dass sie sich weiterhin entscheiden werden, in Zukunft unsere Produkte zu nutzen! Mit freundlichen Grüßen, Die DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Garantie: Dieses Produkt hat keine Garantie jeglicher Sorte. Ihre Erde könnte nicht gespeichert werden, er könnte langsam in die Umwelt gesaugt werden, oder stattdessen könnte das Produkt gar nichts machen. -book.ironchest:dirtchest9000.page5=DirtChest 9000 ist freundlich zur Umwelt. Bitte entsorgen Sie diesen Guide verantwortungsbewusst, und tun sie nicht, was Sie immer tun und schmeißen ihn in irgendwelche Lava. Wir würden sehr traurig sein. diff --git a/src/main/resources/assets/ironchest/lang/de_de.json b/src/main/resources/assets/ironchest/lang/de_de.json new file mode 100644 index 00000000..9e526dfc --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/de_de.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Eisentruhe", + "block.ironchest.gold_chest": "Goldtruhe", + "block.ironchest.diamond_chest": "Diamanttruhe", + "block.ironchest.copper_chest": "Kupfertruhe", + "block.ironchest.silver_chest": "Silbertruhe", + "block.ironchest.crystal_chest": "Kristalltruhe", + "block.ironchest.obsidian_chest": "Obsidiantruhe", + "block.ironchest.dirt_chest": "ErdTruhe 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Upgrade: Eisen zu Goldtruhe", + "item.ironchest.gold_to_diamond_chest_upgrade": "Upgrade: Gold zu Diamanttruhe", + "item.ironchest.copper_to_silver_chest_upgrade": "Upgrade: Kupfer zu Silbertruhe", + "item.ironchest.silver_to_gold_chest_upgrade": "Upgrade: Silber zu Goldtruhe", + "item.ironchest.copper_to_iron_chest_upgrade": "Upgrade: Kupfer zu Eisentruhe", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Upgrade: Diamant zu Kristalltruhe", + "item.ironchest.wood_to_iron_chest_upgrade": "Upgrade: Holz zu Eisentruhe", + "item.ironchest.wood_to_copper_chest_upgrade": "Upgrade: Holz zu Kupfertruhe", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Upgrade: Diamant zu Obsidiantruhe", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "Bedienungsanleitung für ihre ErdTruhe 9000!", + "book.ironchest.dirtchest9000.page1": "Vielen Dank, dass sie sich für eine neue ErdTruhe 9000 entschieden haben. Wir hoffen, dass sie für Jahre Freude daran haben werden, ihre Erde in dieser Truhe zu lagern.", + "book.ironchest.dirtchest9000.page2": "Benutzung: füllen sie einfach einen Stack Erde nach Wahl in den äußerst aufnahmefähigen Slot ein und erfreuen sie sich jedes Mal, wenn sie an dieser Truhe vorbeilaufen, an der Bequemlichkeit, diese Erde jederzeit verfügbar zu haben.", + "book.ironchest.dirtchest9000.page3": "Wir hoffen, dass ihnen diese Bedienungsanleitung gefallen hat und dass sie sich auch in Zukunft für unsere Produkte entscheiden werden! Mit freundlichen Grüßen, ihre ErdTruhe 9000 GmbH & Co. KG", + "book.ironchest.dirtchest9000.page4": "Garantiebestimmungen: Wir übernehmen keine Gewährleistung für dieses Produkt. Ihre Erde könnte zufällig verschwinden, langsam auf den Boden rieseln oder auch überhaupt nicht gespeichert werden.", + "book.ironchest.dirtchest9000.page5": "DirtChest 9000 achtet die Umwelt. Bitte entsorgen sie diese Bedienungsanleitung fachgerecht und werfen sie sie nicht einfach in Lava. Wir wären sehr traurig.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Eisentruhe", + "ironchest.container.gold_chest": "Goldtruhe", + "ironchest.container.diamond_chest": "Diamanttruhe", + "ironchest.container.copper_chest": "Kupfertruhe", + "ironchest.container.silver_chest": "Silbertruhe", + "ironchest.container.crystal_chest": "Kristalltruhe", + "ironchest.container.obsidian_chest": "Obsidiantruhe", + "ironchest.container.dirt_chest": "ErdTruhe 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Eisentruhen" +} diff --git a/src/main/resources/assets/ironchest/lang/el_GR.lang b/src/main/resources/assets/ironchest/lang/el_GR.lang deleted file mode 100755 index 67285bbd..00000000 --- a/src/main/resources/assets/ironchest/lang/el_GR.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=ΣιδεÏένιο ΣεντοÏκι -tile.ironchest:GOLD.name=ΧÏυσό ΣεντοÏκι -tile.ironchest:DIAMOND.name=Διαμαντένιο ΣεντοÏκι -tile.ironchest:COPPER.name=Χάλκινο ΣεντοÏκι -tile.ironchest:SILVER.name=Ασημένιο ΣεντοÏκι -tile.ironchest:CRYSTAL.name=ΚÏυστάλλινο ΣεντοÏκι -tile.ironchest:OBSIDIAN.name=ΣεντοÏκι ÎŸÏˆÎ¹Î´Î¹Î±Î½Î¿Ï - -item.ironchest:IRONGOLD.name=Αναβάθμιση από ΣιδεÏένιο σε ΧÏυσό ΣεντοÏκι -item.ironchest:GOLDDIAMOND.name=Αναβάθμιση από ΧÏυσό σε Διαμαντένιο ΣεντοÏκι -item.ironchest:COPPERSILVER.name=Αναβάθμιση από Χάλκινο σε Ασημένιο ΣεντοÏκι -item.ironchest:SILVERGOLD.name=Αναβάθμιση από Ασημένιο σε ΧÏυσό ΣεντοÏκι -item.ironchest:COPPERIRON.name=Αναβάθμιση από Χάλκινο σε ΣιδεÏένιο ΣεντοÏκι -item.ironchest:DIAMONDCRYSTAL.name=Αναβάθμιση από Διαμαντένιο σε ΚÏυστάλλινο ΣεντοÏκι -item.ironchest:WOODIRON.name=Αναβάθμιση από ΞÏλινο σε ΣιδεÏένιο ΣεντοÏκι -item.ironchest:WOODCOPPER.name=Αναβάθμιση από ΞÏλινο σε Χάλκινο ΣεντοÏκι -item.ironchest:DIAMONDOBSIDIAN.name=Αναβάθμιση από Διαμαντένιο σε ΣεντοÏκι ÎŸÏˆÎ¹Î´Î¹Î±Î½Î¿Ï diff --git a/src/main/resources/assets/ironchest/lang/en_PT.lang b/src/main/resources/assets/ironchest/lang/en_PT.lang deleted file mode 100755 index ea69e274..00000000 --- a/src/main/resources/assets/ironchest/lang/en_PT.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Steel Coffer -tile.ironchest:GOLD.name=Gold Coffer -tile.ironchest:DIAMOND.name=Diamond Coffer -tile.ironchest:COPPER.name=Copper Coffer -tile.ironchest:SILVER.name=Silver Coffer -tile.ironchest:CRYSTAL.name=Shinin' Coffer -tile.ironchest:OBSIDIAN.name=Coffer o' tears -tile.ironchest:DIRTCHEST9000.name=FilthCoffer 9000! - -item.ironchest:IRONGOLD.name=Steel to Gold Coffer Upgradin' -item.ironchest:GOLDDIAMOND.name=Gold to Diamond Coffer Upgradin' -item.ironchest:COPPERSILVER.name=Copper to Silver Coffer Upgradin' -item.ironchest:SILVERGOLD.name=Silver to Gold Coffer Upgradin' -item.ironchest:COPPERIRON.name=Copper to Steel Coffer Upgradin' -item.ironchest:DIAMONDCRYSTAL.name=Diamond to Shinin' Coffer Upgradin' -item.ironchest:WOODIRON.name=Timber to Steel Coffer Upgradin' -item.ironchest:WOODCOPPER.name=Wood to Copper Coffer Upgradin' -item.ironchest:DIAMONDOBSIDIAN.name=Diamond to Coffer o' Tears Upgradin' - -book.ironchest:dirtchest9000.title=How to use yer FilthCoffer 9000! -book.ironchest:dirtchest9000.page1=Welcome to yer new FilthCoffer 9000! We hope ye will enjoy many happy years of storing yer filth wit yer coffer . -book.ironchest:dirtchest9000.page2=Usage: simply put yer filth in yer slot and yer got yerself some filth any time ye need it! -book.ironchest:dirtchest9000.page3=We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Warranty: We can't keep yer filth from pirates. Yer filth may not be stored, it may slowly return to yer world, or it may stay in yer coffer. -book.ironchest:dirtchest9000.page5=FilthCoffer 9000 is kind to yer voyage. Throw yer paper in a coffer near by wit yer booty, and don't just chuck it into some molten rock. We wouldn't be the happiest o' pirates. diff --git a/src/main/resources/assets/ironchest/lang/en_US.lang b/src/main/resources/assets/ironchest/lang/en_US.lang deleted file mode 100755 index c848ed80..00000000 --- a/src/main/resources/assets/ironchest/lang/en_US.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Iron Chest -tile.ironchest:GOLD.name=Gold Chest -tile.ironchest:DIAMOND.name=Diamond Chest -tile.ironchest:COPPER.name=Copper Chest -tile.ironchest:SILVER.name=Silver Chest -tile.ironchest:CRYSTAL.name=Crystal Chest -tile.ironchest:OBSIDIAN.name=Obsidian Chest -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Iron to Gold Chest Upgrade -item.ironchest:GOLDDIAMOND.name=Gold to Diamond Chest Upgrade -item.ironchest:COPPERSILVER.name=Copper to Silver Chest Upgrade -item.ironchest:SILVERGOLD.name=Silver to Gold Chest Upgrade -item.ironchest:COPPERIRON.name=Copper to Iron Chest Upgrade -item.ironchest:DIAMONDCRYSTAL.name=Diamond to Crystal Chest Upgrade -item.ironchest:WOODIRON.name=Wood to Iron Chest Upgrade -item.ironchest:WOODCOPPER.name=Wood to Copper Chest Upgrade -item.ironchest:DIAMONDOBSIDIAN.name=Diamond to Obsidian Chest Upgrade - -book.ironchest:dirtchest9000.title=How to use your DirtChest 9000! -book.ironchest:dirtchest9000.page1=Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility. -book.ironchest:dirtchest9000.page2=Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest! -book.ironchest:dirtchest9000.page3=We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all. -book.ironchest:dirtchest9000.page5=DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad. diff --git a/src/main/resources/assets/ironchest/lang/en_ud.json b/src/main/resources/assets/ironchest/lang/en_ud.json new file mode 100644 index 00000000..40622cac --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/en_ud.json @@ -0,0 +1,45 @@ +{ + "_comment": "Blocks", + + "block.ironchest.iron_chest": "\u0287s\u01DD\u0265\u0186 uo\u0279I", + "block.ironchest.gold_chest": "\u0287s\u01DD\u0265\u0186 p\u05DFo\u2141", + + "block.ironchest.diamond_chest": "\u0287s\u01DD\u0265\u0186 puo\u026F\u0250\u0131\u15E1", + "block.ironchest.copper_chest": "\u0287s\u01DD\u0265\u0186 \u0279\u01DDddo\u0186", + "block.ironchest.silver_chest": "\u0287s\u01DD\u0265\u0186 \u0279\u01DD\u028C\u05DF\u0131S", + "block.ironchest.crystal_chest": "\u0287s\u01DD\u0265\u0186 \u05DF\u0250\u0287s\u028E\u0279\u0186", + "block.ironchest.obsidian_chest": "\u0287s\u01DD\u0265\u0186 u\u0250\u0131p\u0131sqO", + "block.ironchest.dirt_chest": "\u00A10006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 p\u05DFo\u2141 o\u27D8 uo\u0279I", + "item.ironchest.gold_to_diamond_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 puo\u026F\u0250\u0131\u15E1 o\u27D8 p\u05DFo\u2141", + "item.ironchest.copper_to_silver_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 \u0279\u01DD\u028C\u05DF\u0131S o\u27D8 \u0279\u01DDddo\u0186", + "item.ironchest.silver_to_gold_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 p\u05DFo\u2141 o\u27D8 \u0279\u01DD\u028C\u05DF\u0131S", + "item.ironchest.copper_to_iron_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 uo\u0279I o\u27D8 \u0279\u01DDddo\u0186", + "item.ironchest.diamond_to_crystal_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 \u05DF\u0250\u0287s\u028E\u0279\u0186 o\u27D8 puo\u026F\u0250\u0131\u15E1", + "item.ironchest.wood_to_iron_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 uo\u0279I o\u27D8 pooM", + "item.ironchest.wood_to_copper_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 \u0279\u01DDddo\u0186 o\u27D8 pooM", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "\u01DDp\u0250\u0279bd\u2229 \u0287s\u01DD\u0265\u0186 u\u0250\u0131p\u0131sqO o\u27D8 puo\u026F\u0250\u0131\u15E1", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "\u00A10006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1 \u0279no\u028E \u01DDsn o\u0287 \u028DoH", + "book.ironchest.dirtchest9000.page1": "\u02D9\u028E\u0287\u0131\u05DF\u0131\u0287n \u01DDb\u0250\u0279o\u0287s \u0279no u\u0131 \u0287\u0279\u0131p \u025Fo \u029E\u0254\u0250\u0287s \u0279no\u028E bu\u0131\u0279o\u0287s \u025Fo s\u0279\u0250\u01DD\u028E \u028Edd\u0250\u0265 \u028Eu\u0250\u026F \u028Eo\u0638u\u01DD \u05DF\u05DF\u0131\u028D no\u028E \u01DDdo\u0265 \u01DDM \u00A10006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1 \u028D\u01DDu \u0279no\u028E o\u0287 \u01DD\u026Fo\u0254\u05DF\u01DDM", + "book.ironchest.dirtchest9000.page2": "\u00A1\u0287s\u01DD\u0265\u0254 s\u0131\u0265\u0287 \u028Eq ss\u0250d no\u028E \u01DD\u026F\u0131\u0287 \u028Eu\u0250 'no\u028E o\u0287 \u01DD\u05DFq\u0250\u05DF\u0131\u0250\u028C\u0250 \u0287\u0279\u0131p \u0287\u0250\u0265\u0287 bu\u0131\u028C\u0250\u0265 \u025Fo \u01DD\u0254u\u01DD\u0131u\u01DD\u028Cuo\u0254 \u0287\u0250\u01DD\u0279b \u01DD\u0265\u0287 \u028Eo\u0638u\u01DD pu\u0250 \u0287o\u05DFs \u01DD\u028C\u0131\u0287d\u01DD\u0254\u01DD\u0279 \u028E\u05DF\u0265b\u0131\u0265 \u01DD\u0265\u0287 o\u0287u\u0131 \u01DD\u0254\u0131o\u0265\u0254 \u0279no\u028E \u025Fo \u0287\u0279\u0131p \u025Fo \u029E\u0254\u0250\u0287s \u01DD\u0265\u0287 \u0287\u0279\u01DDsu\u0131 \u028E\u05DFd\u026F\u0131s :\u01DDb\u0250s\u2229", + "book.ironchest.dirtchest9000.page3": "\u02D9p\u01DD\u0287\u0250\u0279od\u0279o\u0254u\u0131 s\u0279\u01DD\u0287\u0131\u0279\u028D \u05DF\u0250nu\u0250\u026F 0006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1 \u01DD\u0265\u27D8 'sp\u0279\u0250b\u01DD\u0279 pu\u0131\u029E \u00A1\u01DD\u0279n\u0287n\u025F u\u0131 s\u0287\u0254npo\u0279d \u0279no bu\u0131sn \u0279\u01DDp\u0131suo\u0254 \u05DF\u05DF\u0131\u028D no\u028E \u01DDdo\u0265 pu\u0250 '\u05DF\u0250nu\u0250\u026F uo\u0131\u0287\u0254n\u0279\u0287su\u0131 s\u0131\u0265\u0287 bu\u0131\u028D\u01DD\u0131\u028C\u01DD\u0279 p\u01DD\u028Eo\u0638u\u01DD \u01DD\u028C\u0250\u0265 no\u028E \u01DDdo\u0265 \u01DDM", + "book.ironchest.dirtchest9000.page4": "\u02D9\u05DF\u05DF\u0250 \u0287\u0250 bu\u0131\u0265\u0287\u028Eu\u0250 op \u0287ou \u028E\u0250\u026F \u0287\u0131 '\u028E\u05DF\u01DD\u028C\u0131\u0287\u0250u\u0279\u01DD\u0287\u05DF\u0250 \u0279o '\u0287u\u01DD\u026Fuo\u0279\u0131\u028Cu\u01DD \u01DD\u0265\u0287 o\u0287u\u0131 \u0265\u0254\u01DD\u01DD\u05DF \u028E\u05DF\u028Do\u05DFs \u028E\u0250\u026F \u0287\u0131 'p\u01DD\u0279o\u0287s \u01DDq \u0287ou \u028E\u0250\u026F \u0287\u0279\u0131p \u0279no\u028E \u02D9pu\u0131\u029E \u028Eu\u0250 \u025Fo \u028E\u0287u\u0250\u0279\u0279\u0250\u028D ou s\u0250\u0265 \u0287\u0254npo\u0279d s\u0131\u0265\u27D8 :\u028E\u0287u\u0250\u0279\u0279\u0250M", + "book.ironchest.dirtchest9000.page5": "\u02D9p\u0250s \u028E\u0279\u01DD\u028C \u01DDq p\u05DFno\u028D \u01DDM \u02D9\u0250\u028C\u0250\u05DF \u01DD\u026Fos o\u0287u\u0131 \u0287\u0131 \u029E\u0254n\u0265\u0254 \u0287sn\u0638 op no\u028E \u0279\u01DD\u028C\u01DD\u0287\u0250\u0265\u028D \u0287ou op pu\u0250 '\u028E\u05DFq\u0131suods\u01DD\u0279 \u029Eooq \u01DDp\u0131nb s\u0131\u0265\u0287 \u025Fo \u01DDsods\u0131p \u01DDs\u0250\u01DD\u05DF\u0500 \u02D9\u0287u\u01DD\u026Fuo\u0279\u0131\u028Cu\u01DD \u01DD\u0265\u0287 o\u0287 pu\u0131\u029E s\u0131 0006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1", + + "_comment": "Containers", + "ironchest.container.iron_chest": "\u0287s\u01DD\u0265\u0186 uo\u0279I", + "ironchest.container.gold_chest": "\u0287s\u01DD\u0265\u0186 p\u05DFo\u2141", + "ironchest.container.diamond_chest": "\u0287s\u01DD\u0265\u0186 puo\u026F\u0250\u0131\u15E1", + "ironchest.container.copper_chest": "\u0287s\u01DD\u0265\u0186 \u0279\u01DDddo\u0186", + "ironchest.container.silver_chest": "\u0287s\u01DD\u0265\u0186 \u0279\u01DD\u028C\u05DF\u0131S", + "ironchest.container.crystal_chest": "\u0287s\u01DD\u0265\u0186 \u05DF\u0250\u0287s\u028E\u0279\u0186", + "ironchest.container.obsidian_chest": "\u0287s\u01DD\u0265\u0186 u\u0250\u0131p\u0131sqO", + "ironchest.container.dirt_chest": "\u00A10006 \u0287s\u01DD\u0265\u0186\u0287\u0279\u0131\u15E1", + + "_comment": "Item Groups", + "itemGroup.ironchest": "s\u0287s\u01DD\u0265\u0186 uo\u0279I" +} diff --git a/src/main/resources/assets/ironchest/lang/en_us.json b/src/main/resources/assets/ironchest/lang/en_us.json new file mode 100644 index 00000000..fa8f9c94 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/en_us.json @@ -0,0 +1,50 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Iron Chest", + "block.ironchest.gold_chest": "Gold Chest", + "block.ironchest.diamond_chest": "Diamond Chest", + "block.ironchest.copper_chest": "Copper Chest", + "block.ironchest.crystal_chest": "Crystal Chest", + "block.ironchest.obsidian_chest": "Obsidian Chest", + "block.ironchest.dirt_chest": "DirtChest 9000!", + + "block.ironchest.trapped_iron_chest": "Trapped Iron Chest", + "block.ironchest.trapped_gold_chest": "Trapped Gold Chest", + "block.ironchest.trapped_diamond_chest": "Trapped Diamond Chest", + "block.ironchest.trapped_copper_chest": "Trapped Copper Chest", + "block.ironchest.trapped_crystal_chest": "Trapped Crystal Chest", + "block.ironchest.trapped_obsidian_chest": "Trapped Obsidian Chest", + "block.ironchest.trapped_dirt_chest": "Trapped DirtChest 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Iron to Gold Chest Upgrade", + "item.ironchest.gold_to_diamond_chest_upgrade": "Gold to Diamond Chest Upgrade", + "item.ironchest.copper_to_silver_chest_upgrade": "Copper to Silver Chest Upgrade", + "item.ironchest.silver_to_gold_chest_upgrade": "Silver to Gold Chest Upgrade", + "item.ironchest.copper_to_iron_chest_upgrade": "Copper to Iron Chest Upgrade", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Diamond to Crystal Chest Upgrade", + "item.ironchest.wood_to_iron_chest_upgrade": "Wood to Iron Chest Upgrade", + "item.ironchest.wood_to_copper_chest_upgrade": "Wood to Copper Chest Upgrade", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Diamond to Obsidian Chest Upgrade", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "How to use your DirtChest 9000!", + "book.ironchest.dirtchest9000.page1": "Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility.", + "book.ironchest.dirtchest9000.page2": "Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest!", + "book.ironchest.dirtchest9000.page3": "We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated.", + "book.ironchest.dirtchest9000.page4": "Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all.", + "book.ironchest.dirtchest9000.page5": "DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Iron Chest", + "ironchest.container.gold_chest": "Gold Chest", + "ironchest.container.diamond_chest": "Diamond Chest", + "ironchest.container.copper_chest": "Copper Chest", + "ironchest.container.silver_chest": "Silver Chest", + "ironchest.container.crystal_chest": "Crystal Chest", + "ironchest.container.obsidian_chest": "Obsidian Chest", + "ironchest.container.dirt_chest": "DirtChest 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/es_ES.lang b/src/main/resources/assets/ironchest/lang/es_ES.lang deleted file mode 100755 index b770efc1..00000000 --- a/src/main/resources/assets/ironchest/lang/es_ES.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Cofre de Hierro -tile.ironchest:GOLD.name=Cofre de Oro -tile.ironchest:DIAMOND.name=Cofre de Diamante -tile.ironchest:COPPER.name=Cofre de Cobre -tile.ironchest:SILVER.name=Cofre de Plata -tile.ironchest:CRYSTAL.name=Cofre de Cristal -tile.ironchest:OBSIDIAN.name=Cofre de Obsidiana - -item.ironchest:IRONGOLD.name=Mejora de Cofre de Hierro a Oro -item.ironchest:GOLDDIAMOND.name=Mejora de Cofre de Oro a Diamante -item.ironchest:COPPERSILVER.name=Mejora de Cofre de Cobre a Plata -item.ironchest:SILVERGOLD.name=Mejora de Cofre de Plata a Oro -item.ironchest:COPPERIRON.name=Mejora de Cofre de Cobre a Hierro -item.ironchest:DIAMONDCRYSTAL.name=Mejora de Cofre de Diamante a Cristal -item.ironchest:WOODIRON.name=Mejora de Cofre de Madera a Hierro -item.ironchest:WOODCOPPER.name=Mejora de Cofre de Madera a Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Mejora de Cofre de Diamante a Obsidiana diff --git a/src/main/resources/assets/ironchest/lang/es_ar.json b/src/main/resources/assets/ironchest/lang/es_ar.json new file mode 100644 index 00000000..ad81a6be --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/es_ar.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Cofre de hierro", + "block.ironchest.gold_chest": "Cofre de oro", + "block.ironchest.diamond_chest": "Cofre de diamante", + "block.ironchest.copper_chest": "Cofre de cobre", + "block.ironchest.silver_chest": "Cofre de plata", + "block.ironchest.crystal_chest": "Cofre de cristal", + "block.ironchest.obsidian_chest": "Cofre de obsidiana", + "block.ironchest.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Mejora de cofre de hierro a oro", + "item.ironchest.gold_to_diamond_chest_upgrade": "Mejora de cofre de oro a diamante", + "item.ironchest.copper_to_silver_chest_upgrade": "Mejora de cofre de cobre a plata", + "item.ironchest.silver_to_gold_chest_upgrade": "Mejora de cofre de plata a oro", + "item.ironchest.copper_to_iron_chest_upgrade": "Mejora de cofre de cobre a hierro", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Mejora de cofre de diamante a cristal", + "item.ironchest.wood_to_iron_chest_upgrade": "Mejora de cofre de madera a hierro", + "item.ironchest.wood_to_copper_chest_upgrade": "Mejora de cofre de madera a cobre", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Mejora de cofre de diamante a obsidiana", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "¡Cómo usar su CofreTierra 9000!", + "book.ironchest.dirtchest9000.page1": "¡Le damos la bienvenida a su nuevo CofreTierra 9000! Esperamos que disfrute de muchos años preservando sus montones de tierra en nuestra gran utilidad de almacenamiento.", + "book.ironchest.dirtchest9000.page2": "Modo de uso: simplemente introduzca el stack de tierra a su elección en el espacio altamente receptivo, y disfrute de la maravillosa comodidad de tener tierra disponible siempre que pase cerca del cofre", + "book.ironchest.dirtchest9000.page3": "¡Esperamos que haya disfrutado de la lectura de este manual de instrucciones, y que considere usar nuestros productos en el futuro! Saludos cordiales, los escritores del manual del CofreTierra 9000 y asociados.", + "book.ironchest.dirtchest9000.page4": "Garantía: Este producto no tiene ningún tipo de garantía. Es posible que su tierra no se preserve o que se fitre lentamente en el entorno. Alternativamente, puede que no pase nada en lo absoluto.", + "book.ironchest.dirtchest9000.page5": "CofreTierra 9000 es amigable con el ambiente. Por favor deshagase de esta guía de forma responsable y, ante todo, no lo tire en la lava. Nos pondría muy trsites.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Cofre de hierro", + "ironchest.container.gold_chest": "Cofre de oro", + "ironchest.container.diamond_chest": "Cofre de diamante", + "ironchest.container.copper_chest": "Cofre de cobre", + "ironchest.container.silver_chest": "Cofre de plata", + "ironchest.container.crystal_chest": "Cofre de cristal", + "ironchest.container.obsidian_chest": "Cofre de obsidiana", + "ironchest.container.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/es_es.json b/src/main/resources/assets/ironchest/lang/es_es.json new file mode 100644 index 00000000..b54faa42 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/es_es.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Cofre de hierro", + "block.ironchest.gold_chest": "Cofre de oro", + "block.ironchest.diamond_chest": "Cofre de diamante", + "block.ironchest.copper_chest": "Cofre de cobre", + "block.ironchest.silver_chest": "Cofre de plata", + "block.ironchest.crystal_chest": "Cofre de cristal", + "block.ironchest.obsidian_chest": "Cofre de obsidiana", + "block.ironchest.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Mejora de cofre de hierro a oro", + "item.ironchest.gold_to_diamond_chest_upgrade": "Mejora de cofre de oro a diamante", + "item.ironchest.copper_to_silver_chest_upgrade": "Mejora de cofre de cobre a plata", + "item.ironchest.silver_to_gold_chest_upgrade": "Mejora de cofre de plata a oro", + "item.ironchest.copper_to_iron_chest_upgrade": "Mejora de cofre de cobre a hierro", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Mejora de cofre de diamante a cristal", + "item.ironchest.wood_to_iron_chest_upgrade": "Mejora de cofre de madera a hierro", + "item.ironchest.wood_to_copper_chest_upgrade": "Mejora de cofre de madera a cobre", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Mejora de cofre de diamante a obsidiana", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "¡Cómo usar su CofreTierra 9000!", + "book.ironchest.dirtchest9000.page1": "¡Le damos la bienvenida a su nuevo CofreTierra 9000! Esperamos que disfrute de muchos años preservando sus montones de tierra en nuestra gran utilidad de almacenamiento.", + "book.ironchest.dirtchest9000.page2": "Modo de uso: simplemente introduzca el stack de tierra a su elección en el espacio altamente receptivo, y disfrute de la maravillosa comodidad de tener tierra disponible siempre que pase cerca del cofre", + "book.ironchest.dirtchest9000.page3": "¡Esperamos que haya disfrutado de la lectura de este manual de instrucciones, y que considere usar nuestros productos en el futuro! Saludos cordiales, los escritores del manual del CofreTierra 9000 y asociados.", + "book.ironchest.dirtchest9000.page4": "Garantía: Este producto no tiene ningún tipo de garantía. Es posible que su tierra no se preserve o se filtre lentamente en el entorno. Alternativamente, puede que no pase nada en lo absoluto.", + "book.ironchest.dirtchest9000.page5": "CofreTierra 9000 es amigable con el ambiente. Por favor deshagase de esta guía de forma responsable y, ante todo, no lo tire en la lava. Nos pondría muy trsites.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Cofre de hierro", + "ironchest.container.gold_chest": "Cofre de oro", + "ironchest.container.diamond_chest": "Cofre de diamante", + "ironchest.container.copper_chest": "Cofre de cobre", + "ironchest.container.silver_chest": "Cofre de plata", + "ironchest.container.crystal_chest": "Cofre de cristal", + "ironchest.container.obsidian_chest": "Cofre de obsidiana", + "ironchest.container.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/es_mx.json b/src/main/resources/assets/ironchest/lang/es_mx.json new file mode 100644 index 00000000..b54faa42 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/es_mx.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Cofre de hierro", + "block.ironchest.gold_chest": "Cofre de oro", + "block.ironchest.diamond_chest": "Cofre de diamante", + "block.ironchest.copper_chest": "Cofre de cobre", + "block.ironchest.silver_chest": "Cofre de plata", + "block.ironchest.crystal_chest": "Cofre de cristal", + "block.ironchest.obsidian_chest": "Cofre de obsidiana", + "block.ironchest.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Mejora de cofre de hierro a oro", + "item.ironchest.gold_to_diamond_chest_upgrade": "Mejora de cofre de oro a diamante", + "item.ironchest.copper_to_silver_chest_upgrade": "Mejora de cofre de cobre a plata", + "item.ironchest.silver_to_gold_chest_upgrade": "Mejora de cofre de plata a oro", + "item.ironchest.copper_to_iron_chest_upgrade": "Mejora de cofre de cobre a hierro", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Mejora de cofre de diamante a cristal", + "item.ironchest.wood_to_iron_chest_upgrade": "Mejora de cofre de madera a hierro", + "item.ironchest.wood_to_copper_chest_upgrade": "Mejora de cofre de madera a cobre", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Mejora de cofre de diamante a obsidiana", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "¡Cómo usar su CofreTierra 9000!", + "book.ironchest.dirtchest9000.page1": "¡Le damos la bienvenida a su nuevo CofreTierra 9000! Esperamos que disfrute de muchos años preservando sus montones de tierra en nuestra gran utilidad de almacenamiento.", + "book.ironchest.dirtchest9000.page2": "Modo de uso: simplemente introduzca el stack de tierra a su elección en el espacio altamente receptivo, y disfrute de la maravillosa comodidad de tener tierra disponible siempre que pase cerca del cofre", + "book.ironchest.dirtchest9000.page3": "¡Esperamos que haya disfrutado de la lectura de este manual de instrucciones, y que considere usar nuestros productos en el futuro! Saludos cordiales, los escritores del manual del CofreTierra 9000 y asociados.", + "book.ironchest.dirtchest9000.page4": "Garantía: Este producto no tiene ningún tipo de garantía. Es posible que su tierra no se preserve o se filtre lentamente en el entorno. Alternativamente, puede que no pase nada en lo absoluto.", + "book.ironchest.dirtchest9000.page5": "CofreTierra 9000 es amigable con el ambiente. Por favor deshagase de esta guía de forma responsable y, ante todo, no lo tire en la lava. Nos pondría muy trsites.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Cofre de hierro", + "ironchest.container.gold_chest": "Cofre de oro", + "ironchest.container.diamond_chest": "Cofre de diamante", + "ironchest.container.copper_chest": "Cofre de cobre", + "ironchest.container.silver_chest": "Cofre de plata", + "ironchest.container.crystal_chest": "Cofre de cristal", + "ironchest.container.obsidian_chest": "Cofre de obsidiana", + "ironchest.container.dirt_chest": "¡CofreTierra 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/et_EE.lang b/src/main/resources/assets/ironchest/lang/et_EE.lang deleted file mode 100755 index c0b3776c..00000000 --- a/src/main/resources/assets/ironchest/lang/et_EE.lang +++ /dev/null @@ -1,18 +0,0 @@ -tile.ironchest:IRON.name=Raudkirst -tile.ironchest:GOLD.name=Kuldkirst -tile.ironchest:DIAMOND.name=Teemantkirst -tile.ironchest:COPPER.name=Vaskkirst -tile.ironchest:SILVER.name=Hõbekirst -tile.ironchest:CRYSTAL.name=Kristallkirst -tile.ironchest:OBSIDIAN.name=Obsidiaankirst -tile.ironchest:DIRTCHEST9000.name=Muldkirst 9000! - -item.ironchest:IRONGOLD.name=Raudkirst kuld kirstuks -item.ironchest:GOLDDIAMOND.name=Kuldkirst teemandist kirstuks -item.ironchest:COPPERSILVER.name=Vaskkirst hõbedast kirstuks -item.ironchest:SILVERGOLD.name=Hõbekirst kullast kirstuks -item.ironchest:COPPERIRON.name=Vaskkirst rauast kirstuks -item.ironchest:DIAMONDCRYSTAL.name=Teemantkirst kristallist kirstuks -item.ironchest:WOODIRON.name=Puukirst rauast kirstuks -item.ironchest:WOODCOPPER.name=Puukirst vasest kirstuks -item.ironchest:DIAMONDOBSIDIAN.name=Teemantkirst obsidiaanist kirstuks diff --git a/src/main/resources/assets/ironchest/lang/fr_FR.lang b/src/main/resources/assets/ironchest/lang/fr_FR.lang deleted file mode 100755 index c1714d6c..00000000 --- a/src/main/resources/assets/ironchest/lang/fr_FR.lang +++ /dev/null @@ -1,19 +0,0 @@ -#fr_FR translated by robin4002 - -tile.ironchest:IRON.name=Coffre en Fer -tile.ironchest:GOLD.name=Coffre en Or -tile.ironchest:DIAMOND.name=Coffre en Diamant -tile.ironchest:COPPER.name=Coffre en Cuivre -tile.ironchest:SILVER.name=Coffre en Argent -tile.ironchest:CRYSTAL.name=Coffre en Cristal -tile.ironchest:OBSIDIAN.name=Coffre en Obsidienne - -item.ironchest:IRONGOLD.name=Amélioration de coffre en fer à or -item.ironchest:GOLDDIAMOND.name=Amélioration de coffre en or à diamant -item.ironchest:COPPERSILVER.name=Amélioration de coffre en cuivre à argent -item.ironchest:SILVERGOLD.name=Amélioration de coffre en argent à or -item.ironchest:COPPERIRON.name=Amélioration de coffre en cuivre à fer -item.ironchest:DIAMONDCRYSTAL.name=Amélioration de coffre en diamant à crital -item.ironchest:WOODIRON.name=Amélioration de coffre en bois à fer -item.ironchest:WOODCOPPER.name=Amélioration de coffre en bois à cuivre -item.ironchest:DIAMONDOBSIDIAN.name=Amélioration de coffre en diamant à obsidienne diff --git a/src/main/resources/assets/ironchest/lang/fr_fr.json b/src/main/resources/assets/ironchest/lang/fr_fr.json new file mode 100644 index 00000000..c5b1c436 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/fr_fr.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Coffre en fer", + "block.ironchest.gold_chest": "Coffre en or", + "block.ironchest.diamond_chest": "Coffre en diamant", + "block.ironchest.copper_chest": "Coffre en cuivre", + "block.ironchest.silver_chest": "Coffre en argent", + "block.ironchest.crystal_chest": "Coffre de cristal", + "block.ironchest.obsidian_chest": "Coffre en obsidienne", + "block.ironchest.dirt_chest": "DirtChest 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Amélioration Fer à Or", + "item.ironchest.gold_to_diamond_chest_upgrade": "Amélioration Or à Diamant", + "item.ironchest.copper_to_silver_chest_upgrade": "Amélioration Cuivre à Argent", + "item.ironchest.silver_to_gold_chest_upgrade": "Amélioration Argent à Or", + "item.ironchest.copper_to_iron_chest_upgrade": "Amélioration Cuivre à Fer", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Amélioration Diamant à Cristal", + "item.ironchest.wood_to_iron_chest_upgrade": "Amélioration Bois à Fer", + "item.ironchest.wood_to_copper_chest_upgrade": "Amélioration Bois à Cuivre", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Amélioration Diamant à Obsidienne", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "Comment utiliser votre DirtChest 9000!", + "book.ironchest.dirtchest9000.page1": "Découvrez votre nouveau DirtChest 9000! Nous espérons que vous allez aprécier de nombreuse années de stockage de terre dans notre coffre", + "book.ironchest.dirtchest9000.page2": "Utilisation: Inserrez simplement votre terre dans le slot prévu à cet effet et profitez de la simplicité de l'avoir à portée de main dés que vous passez près du coffre!", + "book.ironchest.dirtchest9000.page3": "Nous espérons que ce guide vous aura été utile et que vous continuerez d'utilisez nos produits à l'avenir! Cordialement, la rédaction des manuels DirtChest 9000.", + "book.ironchest.dirtchest9000.page4": "Garantie: Ce produit n'est sous aucune garantie d'aucune sorte. Votre terre ne rentrera peut être pas, elle s'infiltrera peut être lentement dans l'environement ou il ne se passera peut être rien du tout.", + "book.ironchest.dirtchest9000.page5": "Le DirtChest 9000 est bon pour la planette. Merci de vous débarasser de ce guide responsablement et de ne pas le jeter dans la lave, ça nous rendrait triste.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Coffre en fer", + "ironchest.container.gold_chest": "Coffre en or", + "ironchest.container.diamond_chest": "Coffre en diamant", + "ironchest.container.copper_chest": "Coffre en cuivre", + "ironchest.container.silver_chest": "Coffre en argent", + "ironchest.container.crystal_chest": "Coffre de cristal", + "ironchest.container.obsidian_chest": "Coffre en obsidienne", + "ironchest.container.dirt_chest": "DirtChest 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/it_IT.lang b/src/main/resources/assets/ironchest/lang/it_IT.lang deleted file mode 100755 index fc3d82cd..00000000 --- a/src/main/resources/assets/ironchest/lang/it_IT.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Baule di ferro -tile.ironchest:GOLD.name=Baule d'oro -tile.ironchest:DIAMOND.name=Baule di diamante -tile.ironchest:COPPER.name=Baule di rame -tile.ironchest:SILVER.name=Baule d'argento -tile.ironchest:CRYSTAL.name=Baule di cristallo -tile.ironchest:OBSIDIAN.name=Baule di ossidiana -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Potenziamento da ferro a oro -item.ironchest:GOLDDIAMOND.name=Potenziamento da oro a diamante -item.ironchest:COPPERSILVER.name=Potenziamento da rame a argento -item.ironchest:SILVERGOLD.name=Potenziamento da argento a oro -item.ironchest:COPPERIRON.name=Potenziamento da rame a ferro -item.ironchest:DIAMONDCRYSTAL.name=Potenziamento da diamante a cristallo -item.ironchest:WOODIRON.name=Potenziamento da legno a ferro -item.ironchest:WOODCOPPER.name=Potenziamento da legno a rame -item.ironchest:DIAMONDOBSIDIAN.name=Potenziamento da diamante a ossidiana - -book.ironchest:dirtchest9000.title=Come usare la tua DirtChest 9000! -book.ironchest:dirtchest9000.page1=Benvenuto alla tua nuova DirtChest 9000! Speriamo che possiate godere di molti anni felici in cui imagazzinate grandi quantità di terra nei nostri contenitori. -book.ironchest:dirtchest9000.page2=Uso: inserisci uno stack di terra nello slot e goditi la grande convenienza di avere della terra a tua disposizione ogni volta che passi vicino alla cassa! -book.ironchest:dirtchest9000.page3=Speriamo che questo manuale vi sia stato utile, e speriamo che prenderete in considerazione usare i nostri prodotti in futuro ! I migliori saluti, i scrittori del manuale per la DirtChest 9000. -book.ironchest:dirtchest9000.page4=Garanzia: Questo prodotto non ha nessuna garanzia di alcun tipo. La tua terra potrebbe non essere imagazzinata, potrebbe lentamente fuoriuscire nell'ambiente, oppure, non farà niente. -book.ironchest:dirtchest9000.page5=La DirtChest 9000 è amico dell'ambiente. Per favore conservate questo libro in un modo responsabile, e non buttatelo nella lava come un oggetto qualsiasi. Saremmo veramente tristi. diff --git a/src/main/resources/assets/ironchest/lang/kk_kz.json b/src/main/resources/assets/ironchest/lang/kk_kz.json new file mode 100644 index 00000000..73c6345d --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/kk_kz.json @@ -0,0 +1,50 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Темір Ñандық", + "block.ironchest.gold_chest": "Ðлтын Ñандық", + "block.ironchest.diamond_chest": "ÐÐ»Ð¼Ð°Ñ Ñандық", + "block.ironchest.copper_chest": "ÐœÑ‹Ñ Ñандық", + "block.ironchest.crystal_chest": "КриÑталл Ñандық", + "block.ironchest.obsidian_chest": "ОбÑидиан Ñандық", + "block.ironchest.dirt_chest": "ТопырақСандық 9000!", + + "block.ironchest.trapped_iron_chest": "Темір тұзақ Ñандық", + "block.ironchest.trapped_gold_chest": "Ðлтын тұзақ Ñандық", + "block.ironchest.trapped_diamond_chest": "ÐÐ»Ð¼Ð°Ñ Ñ‚Ò±Ð·Ð°Ò› Ñандық", + "block.ironchest.trapped_copper_chest": "ÐœÑ‹Ñ Ñ‚Ò±Ð·Ð°Ò› Ñандық", + "block.ironchest.trapped_crystal_chest": "КриÑталл тұзақ Ñандық", + "block.ironchest.trapped_obsidian_chest": "ОбÑидиан тұзақ Ñандық", + "block.ironchest.trapped_dirt_chest": "Тұзақ ТопырақСандық 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Темірден алтынға Ñандық жетілдіру", + "item.ironchest.gold_to_diamond_chest_upgrade": "Ðлтыннан алмаÑқа Ñандық жетілдіру", + "item.ironchest.copper_to_silver_chest_upgrade": "МыÑтан күміÑке Ñандық жетілдіру", + "item.ironchest.silver_to_gold_chest_upgrade": "КүміÑтен алтынға Ñандық жетілдіру", + "item.ironchest.copper_to_iron_chest_upgrade": "МыÑтан темірге Ñандық жетілдіру", + "item.ironchest.diamond_to_crystal_chest_upgrade": "ÐлмаÑтан криÑталға Ñандық жетілдіру", + "item.ironchest.wood_to_iron_chest_upgrade": "Ðғаштан темірге Ñандық жетілдіру", + "item.ironchest.wood_to_copper_chest_upgrade": "Ðғаштан мыÑқа Ñандық жетілдіру", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "ÐлмаÑтан обÑидианға Ñандық жетілдіру", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "ТопырақСандық 9000-ды қалай қолданады!", + "book.ironchest.dirtchest9000.page1": "Жаңа ТопырақСандық 9000-ыңыз құтты болÑын! Біздің қоймамызда бір Ñтак топырағыңызды қуана ÑақтайÑыз деп үміттенеміз.", + "book.ironchest.dirtchest9000.page2": "Қолдану жолы: қалаған бір Ñтак топырағыңызды аÑа алғыр Ò±Ñшыққа Ñалып, бұл Ñандықтың қаÑында жүргенде, топырақтың Ñізге әрқашан қолжетімді болғанын тамашалаңыз!", + "book.ironchest.dirtchest9000.page3": "Бұл нұÑқаулықтың пайдаÑÑ‹ тигеніне Ñенімді болып, болашақта өнімдерімізді қолданаÑыз деп үміттенеміз! Рақмет, ТопырақСандық 9000 нұÑқаулығын жазғандар incorporated.", + "book.ironchest.dirtchest9000.page4": "Кепілдік: бұл өнімнің еш кепілдігі жоқ. Топырағыңыз Ñақталмауы мүмкін, бірте-бірте Ñарқылуы мүмкін немеÑе, керіÑінше, түк Ñ–Ñтемеуі мүмкін.", + "book.ironchest.dirtchest9000.page5": "ТопырақСандық 9000 қоршаған ортаға қауіпÑіз. Бұл нұÑқаулықты Ð´Ò±Ñ€Ñ‹Ñ Ð¶Ð¾Ð»Ð´Ð° жойғаныңызды өтінеміз, не болÑа да, жай ғана лаваға лақтыра Ñалмаңыз. ӘйтпеÑе қатты ренжиміз.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Темір Ñандық", + "ironchest.container.gold_chest": "Ðлтын Ñандық", + "ironchest.container.diamond_chest": "ÐÐ»Ð¼Ð°Ñ Ñандық", + "ironchest.container.copper_chest": "ÐœÑ‹Ñ Ñандық", + "ironchest.container.silver_chest": "ÐšÒ¯Ð¼Ñ–Ñ Ñандық", + "ironchest.container.crystal_chest": "КриÑталл Ñандық", + "ironchest.container.obsidian_chest": "ОбÑидиан Ñандық", + "ironchest.container.dirt_chest": "ТопырақСандық 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/ko_KR.lang b/src/main/resources/assets/ironchest/lang/ko_KR.lang deleted file mode 100755 index 837ae58b..00000000 --- a/src/main/resources/assets/ironchest/lang/ko_KR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=ì²  ìƒìž -tile.ironchest:GOLD.name=금 ìƒìž -tile.ironchest:DIAMOND.name=다ì´ì•„몬드 ìƒìž -tile.ironchest:COPPER.name=구리 ìƒìž -tile.ironchest:SILVER.name=ì€ ìƒìž -tile.ironchest:CRYSTAL.name=수정 ìƒìž -tile.ironchest:OBSIDIAN.name=í‘ìš”ì„ ìƒìž -tile.ironchest:DIRTCHEST9000.name=í™ ìƒìž 9000! - -item.ironchest:IRONGOLD.name=ì²  ìƒìžë¥¼ 금 ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:GOLDDIAMOND.name=금 ìƒìžë¥¼ 다ì´ì•„몬드 ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:COPPERSILVER.name=구리 ìƒìžë¥¼ ì€ ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:SILVERGOLD.name=ì€ ìƒìžë¥¼ 금 ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:COPPERIRON.name=구리 ìƒìžë¥¼ ì²  ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:DIAMONDCRYSTAL.name=다ì´ì•„몬드 ìƒìžë¥¼ 수정 ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:WOODIRON.name=나무 ìƒìžë¥¼ ì²  ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:WOODCOPPER.name=나무 ìƒìžë¥¼ 구리 ìƒìžë¡œ 업그레ì´ë“œ -item.ironchest:DIAMONDOBSIDIAN.name=다ì´ì•„몬드 ìƒìžë¥¼ í‘ìš”ì„ ìƒìžë¡œ 업그레ì´ë“œ - -book.ironchest:dirtchest9000.title=í™ ìƒìž 9000ì„ ì‚¬ìš©í•˜ëŠ” 방법! -book.ironchest:dirtchest9000.page1=새로운 í™ ìƒìž 9000ì„ ì‚¬ìš©í•˜ê²Œ ë˜ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤! 우리는 ë‹¹ì‹ ì´ ì´ ì €ìž¥ ë„구ì—서 í™ë“¤ì„ ë§Žì€ í•´ ë™ì•ˆ 행복하게 저장하기를 기ì›í•©ë‹ˆë‹¤. -사용법: 단순히 í™ ë­‰ì¹˜ë“¤ì„ ì•„ì´í…œ ìŠ¬ë¡¯ì— ë„£ê³  ì´ ìƒìžë¥¼ 지나갈 때마다 언제나 당신ì—게 제공ë˜ì–´ì§€ëŠ” í™ë“¤ì˜ íŽ¸ë¦¬í•¨ì„ ëˆ„ë¦¬ì„¸ìš”! -book.ironchest:dirtchest9000.page3=우리는 ë‹¹ì‹ ì´ ì´ ì‚¬ìš©ì„¤ëª…ì„œë¥¼ ì¦ê²ê²Œ ì½ì—ˆê³ , ë‚˜ì¤‘ì— ì´ ì œí’ˆì„ ì‚¬ìš©í•˜ê¸°ë¥¼ ë°”ëžë‹ˆë‹¤! í™ ìƒìž 9000 매뉴얼 -book.ironchest:dirtchest9000.page4=주ì˜: ì´ ì œí’ˆì—는 ì–´ë–¤ ì¢…ë¥˜ì˜ ë³´ì¦ë„ 하지 않습니다 ë‹¹ì‹ ì˜ í™ë“¤ì€ 저장ë˜ì§€ ì•Šì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. 그러면 ì´ í™ ìƒìžëŠ” 천천히 환경 ì†ìœ¼ë¡œ ëŒì•„가거나, í˜¹ì€ ì•„ë¬´ê²ƒë„ í•˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤. -book.ironchest:dirtchest9000.page5=í™ ìƒìž 9000ì€ í™˜ê²½ 친화ì ìž…니다. ê°€ì´ë“œë¶ì˜ 처분ì—는 ì±…ìž„ì´ ë”°ë¦…ë‹ˆë‹¤, 그러니 어떠한 경우ë¼ë„ ìš©ì•”ì— ë²„ë¦¬ì§€ 마세요. 우리는 매우 슬플 것입니다. diff --git a/src/main/resources/assets/ironchest/lang/ko_kr.json b/src/main/resources/assets/ironchest/lang/ko_kr.json new file mode 100644 index 00000000..12b7a04f --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/ko_kr.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "ì²  ìƒìž", + "block.ironchest.gold_chest": "금 ìƒìž", + "block.ironchest.diamond_chest": "다ì´ì•„몬드 ìƒìž", + "block.ironchest.copper_chest": "구리 ìƒìž", + "block.ironchest.silver_chest": "ì€ ìƒìž", + "block.ironchest.crystal_chest": "수정 ìƒìž", + "block.ironchest.obsidian_chest": "í‘ìš”ì„ ìƒìž", + "block.ironchest.dirt_chest": "í™ ìƒìž 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "ì²  ìƒìžë¥¼ 금 ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.gold_to_diamond_chest_upgrade": "금 ìƒìžë¥¼ 다ì´ì•„몬드 ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.copper_to_silver_chest_upgrade": "구리 ìƒìžë¥¼ ì€ ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.silver_to_gold_chest_upgrade": "ì€ ìƒìžë¥¼ 금 ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.copper_to_iron_chest_upgrade": "구리 ìƒìžë¥¼ ì²  ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.diamond_to_crystal_chest_upgrade": "다ì´ì•„몬드 ìƒìžë¥¼ 수정 ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.wood_to_iron_chest_upgrade": "나무 ìƒìžë¥¼ ì²  ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.wood_to_copper_chest_upgrade": "나무 ìƒìžë¥¼ 구리 ìƒìžë¡œ 업그레ì´ë“œ", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "다ì´ì•„몬드 ìƒìžë¥¼ í‘ìš”ì„ ìƒìžë¡œ 업그레ì´ë“œ", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "í™ ìƒìž 9000ì„ ì‚¬ìš©í•˜ëŠ” 방법!", + "book.ironchest.dirtchest9000.page1": "새로운 í™ ìƒìž 9000ì„ ì‚¬ìš©í•˜ê²Œ ë˜ì‹  ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤! 우리는 ë‹¹ì‹ ì´ ì´ ì €ìž¥ ë„구ì—서 í™ë“¤ì„ ë§Žì€ í•´ ë™ì•ˆ 행복하게 저장하기를 기ì›í•©ë‹ˆë‹¤.", + "book.ironchest.dirtchest9000.page2": "사용법: 단순히 í™ ë­‰ì¹˜ë“¤ì„ ì•„ì´í…œ ìŠ¬ë¡¯ì— ë„£ê³  ì´ ìƒìžë¥¼ 지나갈 때마다 언제나 당신ì—게 제공ë˜ì–´ì§€ëŠ” í™ë“¤ì˜ íŽ¸ë¦¬í•¨ì„ ëˆ„ë¦¬ì„¸ìš”!", + "book.ironchest.dirtchest9000.page3": "우리는 ë‹¹ì‹ ì´ ì´ ì‚¬ìš©ì„¤ëª…ì„œë¥¼ ì¦ê²ê²Œ ì½ì—ˆê³ , ë‚˜ì¤‘ì— ì´ ì œí’ˆì„ ì‚¬ìš©í•˜ê¸°ë¥¼ ë°”ëžë‹ˆë‹¤! í™ ìƒìž 9000 매뉴얼", + "book.ironchest.dirtchest9000.page4": "주ì˜: ì´ ì œí’ˆì—는 ì–´ë–¤ ì¢…ë¥˜ì˜ ë³´ì¦ë„ 하지 않습니다 ë‹¹ì‹ ì˜ í™ë“¤ì€ 저장ë˜ì§€ ì•Šì„ ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. 그러면 ì´ í™ ìƒìžëŠ” 천천히 환경 ì†ìœ¼ë¡œ ëŒì•„가거나, í˜¹ì€ ì•„ë¬´ê²ƒë„ í•˜ì§€ ì•Šì„ ê²ƒìž…ë‹ˆë‹¤.", + "book.ironchest.dirtchest9000.page5": "í™ ìƒìž 9000ì€ í™˜ê²½ 친화ì ìž…니다. ê°€ì´ë“œë¶ì˜ 처분ì—는 ì±…ìž„ì´ ë”°ë¦…ë‹ˆë‹¤, 그러니 어떠한 경우ë¼ë„ ìš©ì•”ì— ë²„ë¦¬ì§€ 마세요. 우리는 매우 슬플 것입니다.", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/nb_NO.lang b/src/main/resources/assets/ironchest/lang/nb_NO.lang deleted file mode 100755 index c5beb18e..00000000 --- a/src/main/resources/assets/ironchest/lang/nb_NO.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Jernkiste -tile.ironchest:GOLD.name=Gullkiste -tile.ironchest:DIAMOND.name=Diamantkiste -tile.ironchest:COPPER.name=Kobberkiste -tile.ironchest:SILVER.name=Sølvkiste -tile.ironchest:CRYSTAL.name=Krystallkiste -tile.ironchest:OBSIDIAN.name=Obsidiankiste -tile.ironchest:DIRTCHEST9000.name=JordKiste 9000! - -item.ironchest:IRONGOLD.name=Jern til Gull Kisteoppgradering -item.ironchest:GOLDDIAMOND.name=Gull til Diamant Kisteoppgradering -item.ironchest:COPPERSILVER.name=Kobber til Sølv Kisteoppgradering -item.ironchest:SILVERGOLD.name=Sølv til Gull Kisteoppgradering -item.ironchest:COPPERIRON.name=Kobber til Jern Kisteoppgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant til Krystall Kisteoppgradering -item.ironchest:WOODIRON.name=Tre til Jern Kisteoppgradering -item.ironchest:WOODCOPPER.name=Tre til Kobber Kisteoppgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant til Obsidian Kisteoppgradering - -book.ironchest:dirtchest9000.title=Hvordan bruker din JordKiste 9000! -book.ironchest:dirtchest9000.page1=Velkommen til din nye JordKiste9000! Vi hÃ¥per du vil nyte mange lykkelige Ã¥r med lagring av din stabel av jord i vÃ¥ lager verktøy. -book.ironchest:dirtchest9000.page2=Bruk: bare Ã¥ sette bunken med jord av ditt valg i den svært mottakelige sporet og nyte den store fordelen med Ã¥a den jorden tilgjengelig for deg, nÃ¥du passerer denne kisten! -book.ironchest:dirtchest9000.page3=Vi hÃ¥per du har hatt en god fornøyelse gjennom denne bruksanvisningen, og hÃ¥r du vil vurdere Ã¥ bruke vÃ¥ produkter i fremtiden! Vennlig hilsen, JordKiste9000 manual forfattere innarbeidet. -book.ironchest:dirtchest9000.page4=Garanti: Dette produktet har ingen garantier av noe slag. Din jord kan ikke lagres, det kan sakte lekke ut i miljøet, eller alternativt, kan det ikke gjøre noe i det hele tatt. -book.ironchest:dirtchest9000.page5=JordKiste 9000 er snill mot miljøet. Vennligst ta hÃ¥nd om denne veileder boken ansvarlig, og hva du enn gjør ikke kast den inn i noe lav. Vi ville bli veldig trist. diff --git a/src/main/resources/assets/ironchest/lang/nl_NL.lang b/src/main/resources/assets/ironchest/lang/nl_NL.lang deleted file mode 100755 index fb3a2f59..00000000 --- a/src/main/resources/assets/ironchest/lang/nl_NL.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Ijzeren Kist -tile.ironchest:GOLD.name=Gouden Kist -tile.ironchest:DIAMOND.name=Diamanten Kist -tile.ironchest:COPPER.name=Koperen Kist -tile.ironchest:SILVER.name=Zilveren Kist -tile.ironchest:CRYSTAL.name=Kristallen Kist -tile.ironchest:OBSIDIAN.name=Obsidiaanen Kist -tile.ironchest:DIRTCHEST9000.name=Aarden Kist 9000! - -item.ironchest:IRONGOLD.name=Ijzeren naar Gouden Kist Transformatie -item.ironchest:GOLDDIAMOND.name=Gouden naar Diamanten Kist Transformatie -item.ironchest:COPPERSILVER.name=Koperen naar Zilveren Kist Transformatie -item.ironchest:SILVERGOLD.name=Zilveren naar Gouden Kist Transformatie -item.ironchest:COPPERIRON.name=Koperen naar Ijzeren Kist Transformatie -item.ironchest:DIAMONDCRYSTAL.name=Diamanten naar Kristallen Kist Transformatie -item.ironchest:WOODIRON.name=Houten naar Ijzeren Kist Transformatie -item.ironchest:WOODCOPPER.name=Houten naar Koperen Kist Transformatie -item.ironchest:DIAMONDOBSIDIAN.name=Diamanten naar Obsidiaanen Kist Transformatie - -book.ironchest:dirtchest9000.title=Hoe gebruik je uw Aarden Kist 9000! -book.ironchest:dirtchest9000.page1=Welkom voor uw nieuwe Aarden Kist 9000! We hopen dat je veel geluk zal beleven om uw hoop aarde te bewaren in onze stokeer faciliteit. -book.ironchest:dirtchest9000.page2=Gebruik: Plaats simpelweg uw hoop aarde naar uw keuze in de zeer ontvankelijke gleuf en geniet van de geriefelijkheid om dat hoop aarde altijd beschikbaar tot u te hebben, wanneer dan ook! -book.ironchest:dirtchest9000.page3=We hopen dat u heeft genoten om deze handleiding te lezen en we hopen dat u overweegt om onze producten in de toekomst te gebruiken! Met vriendelijke groeten, De Aarden Kist 9000 Handleiding Auteurs. -book.ironchest:dirtchest9000.page4=Garantie: Deze product biedt geen enkele garantie. Uw aarde kan mogenlijk niet gestockeerd worden, het kan langzaam verdampen of het kan ook helemaal niks doen. -book.ironchest:dirtchest9000.page5=Aarden Kist 9000 is mileuvriendelijk. Gelieve deze handleiding verantwoordlijk te ontdoen en gooi het niet zomaar in wat lava. We zouden zeer verdrietig zijn. diff --git a/src/main/resources/assets/ironchest/lang/pl_PL.lang b/src/main/resources/assets/ironchest/lang/pl_PL.lang deleted file mode 100755 index c5ffc855..00000000 --- a/src/main/resources/assets/ironchest/lang/pl_PL.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Å»elazna skrzynia -tile.ironchest:GOLD.name=ZÅ‚ota skrzynia -tile.ironchest:DIAMOND.name=Diamentowa skrzynia -tile.ironchest:COPPER.name=Miedziana skrzynia -tile.ironchest:SILVER.name=Srebrna skrzynia -tile.ironchest:CRYSTAL.name=KrysztaÅ‚owa skrzynia -tile.ironchest:OBSIDIAN.name=Obsydianowa skrzynia - -item.ironchest:IRONGOLD.name=Ulepszenie żelaznej skrzyni na zÅ‚otÄ… -item.ironchest:GOLDDIAMOND.name=Ulepszenie zÅ‚otej skrzyni na diamentowÄ… -item.ironchest:COPPERSILVER.name=Ulepszenie miedzianej skrzyni na srebrnÄ… -item.ironchest:SILVERGOLD.name=Ulepszenie srebrnej skrzyni na zÅ‚otÄ… -item.ironchest:COPPERIRON.name=Ulepszenie miedzianej skrzyni na żelaznÄ… -item.ironchest:DIAMONDCRYSTAL.name=Ulepszenie diamentowej skrzyni na krysztaÅ‚owÄ… -item.ironchest:WOODIRON.name=Ulepszenie drewnianej skrzyni na żelaznÄ… -item.ironchest:WOODCOPPER.name=Ulepszenie drewnianej skrzyni na miedzianÄ… -item.ironchest:DIAMONDOBSIDIAN.name=Ulepszenie diamentowej skrzyni na obsydianowÄ… diff --git a/src/main/resources/assets/ironchest/lang/pl_pl.json b/src/main/resources/assets/ironchest/lang/pl_pl.json new file mode 100644 index 00000000..1e6a3b38 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/pl_pl.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Å»elazna skrzynia", + "block.ironchest.gold_chest": "ZÅ‚ota skrzynia", + "block.ironchest.diamond_chest": "Diamentowa skrzynia", + "block.ironchest.copper_chest": "Miedziana skrzynia", + "block.ironchest.silver_chest": "Srebrna skrzynia", + "block.ironchest.crystal_chest": "KrysztaÅ‚owa skrzynia", + "block.ironchest.obsidian_chest": "Obsydianowa skrzynia", + "block.ironchest.dirt_chest": "DirtChest 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Ulepszenie żelaznej skrzyni na zÅ‚otÄ…", + "item.ironchest.gold_to_diamond_chest_upgrade": "Ulepszenie zÅ‚otej skrzyni na diamentowÄ…", + "item.ironchest.copper_to_silver_chest_upgrade": "Ulepszenie miedzianej skrzyni na srebrnÄ…", + "item.ironchest.silver_to_gold_chest_upgrade": "Ulepszenie srebrnej skrzyni na zÅ‚otÄ…", + "item.ironchest.copper_to_iron_chest_upgrade": "Ulepszenie miedzianej skrzyni na żelaznÄ…", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Ulepszenie diamentowej skrzyni na krysztaÅ‚owÄ…", + "item.ironchest.wood_to_iron_chest_upgrade": "Ulepszenie drewnianej skrzyni na żelaznÄ…", + "item.ironchest.wood_to_copper_chest_upgrade": "Ulepszenie drewnianej skrzyni na miedzianÄ…", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Ulepszenie diamentowej skrzyni na obsydianowÄ…", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "How to use your DirtChest 9000!", + "book.ironchest.dirtchest9000.page1": "Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility.", + "book.ironchest.dirtchest9000.page2": "Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest!", + "book.ironchest.dirtchest9000.page3": "We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated.", + "book.ironchest.dirtchest9000.page4": "Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all.", + "book.ironchest.dirtchest9000.page5": "DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad.", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/pt_BR.lang b/src/main/resources/assets/ironchest/lang/pt_BR.lang deleted file mode 100755 index 38c0e346..00000000 --- a/src/main/resources/assets/ironchest/lang/pt_BR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Baú de Ferro -tile.ironchest:GOLD.name=Baú de Ouro -tile.ironchest:DIAMOND.name=Baú de Diamante -tile.ironchest:COPPER.name=Baú de Cobre -tile.ironchest:SILVER.name=Baú de Prata -tile.ironchest:CRYSTAL.name=Baú de Cristal -tile.ironchest:OBSIDIAN.name=Baú de Obsidiana -tile.ironchest:DIRTCHEST9000.name=BaúDeSujeira 9000! - -item.ironchest:IRONGOLD.name=Aprimoramento de Baú de Ferro para Ouro -item.ironchest:GOLDDIAMOND.name=Aprimoramento de Baú de Ouro para Diamante -item.ironchest:COPPERSILVER.name=Aprimoramento de Baú de Cobre para Prata -item.ironchest:SILVERGOLD.name=Aprimoramento de Baú de Prata para Ouro -item.ironchest:COPPERIRON.name=Aprimoramento de Baú de Cobre para Ferro -item.ironchest:DIAMONDCRYSTAL.name=Aprimoramento de Baú de Diamante para Cristal -item.ironchest:WOODIRON.name=Aprimoramento de Baú de Madeira para Ferro -item.ironchest:WOODCOPPER.name=Aprimoramento de Baú de Madeira para Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Aprimoramento de Baú de Diamante para Obsidiana - -book.ironchest:dirtchest9000.title=Como utilizar seu BaúDeSujeira 9000! -book.ironchest:dirtchest9000.page1=Bem-vindo ao seu novo BaúDeSujeira 9000! Esperamos que desfrute de muitos anos felizes de armazenagem de sua pilha de sujeira em nosso utilitário de armazenamento. -book.ironchest:dirtchest9000.page2=Uso: basta inserir o monte de sujeira de sua escolha no slot altamente receptivo e apreciar a grande conveniência de ter essa sujeira disponíveis para você, a qualquer momento que você passar pelo baú! -book.ironchest:dirtchest9000.page3=Esperamos que tenham gostado de rever este manual de instruções, e espero que você considere o uso de nossos produtos no futuro! Atenciosamente, manual do BaúDeSujeira 9000 escritores incorporados. -book.ironchest:dirtchest9000.page4=Garantia: Este produto não tem qualquer tipo de garantia. Sua sujeira pode não ser armazenada, pode vazar lentamente para o ambiente, ou alternativamente, pode não fazer absolutamente nada. -book.ironchest:dirtchest9000.page5=BaúDeSujeira 9000 é bom para o meio ambiente. Elimine este guia de forma responsável, e não o que você faz apenas lançando-o em alguma lava. Ficaríamos muito triste. diff --git a/src/main/resources/assets/ironchest/lang/pt_PT.lang b/src/main/resources/assets/ironchest/lang/pt_PT.lang deleted file mode 100755 index cb29cb28..00000000 --- a/src/main/resources/assets/ironchest/lang/pt_PT.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Baú de Ferro -tile.ironchest:GOLD.name=Baú de Ouro -tile.ironchest:DIAMOND.name=Baú de Diamante -tile.ironchest:COPPER.name=Baú de Cobre -tile.ironchest:SILVER.name=Baú de Prata -tile.ironchest:CRYSTAL.name=Baú de Cristal -tile.ironchest:OBSIDIAN.name=Baú de Obsidiana - -item.ironchest:IRONGOLD.name=Melhoria de Baú de Ferro para Ouro -item.ironchest:GOLDDIAMOND.name=Melhoria de Baú de Ouro para Diamante -item.ironchest:COPPERSILVER.name=Melhoria de Baú de Cobre para Prata -item.ironchest:SILVERGOLD.name=Melhoria de Baú de Prata para Ouro -item.ironchest:COPPERIRON.name=Melhoria de Baú de Cobre para Ferro -item.ironchest:DIAMONDCRYSTAL.name=Melhoria de Baú de Diamante para Cristal -item.ironchest:WOODIRON.name=Melhoria de Baú de Madeira para Ferro -item.ironchest:WOODCOPPER.name=Melhoria de Baú de Madeira para Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Melhoria de Baú de Diamante para Obsidiana diff --git a/src/main/resources/assets/ironchest/lang/ru_RU.lang b/src/main/resources/assets/ironchest/lang/ru_RU.lang deleted file mode 100755 index 114eee76..00000000 --- a/src/main/resources/assets/ironchest/lang/ru_RU.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Железный Ñундук -tile.ironchest:GOLD.name=Золотой Ñундук -tile.ironchest:DIAMOND.name=Ðлмазный Ñундук -tile.ironchest:COPPER.name=Медный Ñундук -tile.ironchest:SILVER.name=СеребрÑный Ñундук -tile.ironchest:CRYSTAL.name=КриÑтальный Ñундук -tile.ironchest:OBSIDIAN.name=ОбÑидиановый Ñундук - -item.ironchest:IRONGOLD.name=Улучшение из железного в золотой Ñундук -item.ironchest:GOLDDIAMOND.name=Улучшение из золотого в алмазный Ñундук -item.ironchest:COPPERSILVER.name=Улучшение из медного в ÑеребрÑный Ñундук -item.ironchest:SILVERGOLD.name=Улучшение из ÑеребрÑного в золотой Ñундук -item.ironchest:COPPERIRON.name=Улучшение из медного в железный Ñундук -item.ironchest:DIAMONDCRYSTAL.name=Улучшение из алмазного в криÑтальный Ñундук -item.ironchest:WOODIRON.name=Улучшение из деревÑнного в железный Ñундук -item.ironchest:WOODCOPPER.name=Улучшение из деревÑнного в медный Ñундук -item.ironchest:DIAMONDOBSIDIAN.name=Улучшение из алмазного в обÑидиановый Ñундук diff --git a/src/main/resources/assets/ironchest/lang/sv_SE.lang b/src/main/resources/assets/ironchest/lang/sv_SE.lang deleted file mode 100755 index 2bbeacf7..00000000 --- a/src/main/resources/assets/ironchest/lang/sv_SE.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Järnkista -tile.ironchest:GOLD.name=Guldkista -tile.ironchest:DIAMOND.name=Diamantkista -tile.ironchest:COPPER.name=Kopparkista -tile.ironchest:SILVER.name=Silverkista -tile.ironchest:CRYSTAL.name=Kristallkista -tile.ironchest:OBSIDIAN.name=Obsidiankista - -item.ironchest:IRONGOLD.name=Järn till Guld Kistuppgradering -item.ironchest:GOLDDIAMOND.name=Guld till Diamant Kistuppgradering -item.ironchest:COPPERSILVER.name=Koppar till Silver Kistuppgradering -item.ironchest:SILVERGOLD.name=Silver till Guld Kistuppgradering -item.ironchest:COPPERIRON.name=Koppar till Järn Kistuppgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant till Kristal Kistuppgradering -item.ironchest:WOODIRON.name=Trä till Järn Kistuppgradering -item.ironchest:WOODCOPPER.name=Trä till Koppar Kistuppgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant till Obsidian Kistuppgradering diff --git a/src/main/resources/assets/ironchest/lang/tr_TR.lang b/src/main/resources/assets/ironchest/lang/tr_TR.lang deleted file mode 100755 index 9c86204a..00000000 --- a/src/main/resources/assets/ironchest/lang/tr_TR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Demir Sandık -tile.ironchest:GOLD.name=Altın Sandık -tile.ironchest:DIAMOND.name=Elmas Sandık -tile.ironchest:COPPER.name=Bakır Sandık -tile.ironchest:SILVER.name=Gümüş Sandık -tile.ironchest:CRYSTAL.name=Kristal Sandık -tile.ironchest:OBSIDIAN.name=Obsidyen Sandık -tile.ironchest:DIRTCHEST9000.name=Toprak Sandık-9000! - -item.ironchest:IRONGOLD.name=Demir Sandığı Altın Sandığa Yükselt -item.ironchest:GOLDDIAMOND.name=Altın Sandığı Elmas Sandığa Yükselt -item.ironchest:COPPERSILVER.name=Bakır Sandığı Gümüş Sandığa Yükselt -item.ironchest:SILVERGOLD.name=Gümüş Sandığı Altın Sandığa Yükselt -item.ironchest:COPPERIRON.name=Bakır Sandığı Demir Sandığa Yükselt -item.ironchest:DIAMONDCRYSTAL.name=Elmas Sandığı Kristal Sandığa Yükselt -item.ironchest:WOODIRON.name=Tahta Sandığı Demir Sandığa Yükselt -item.ironchest:WOODCOPPER.name=Tahta Sandığı Bakır Sandığa Yükselt -item.ironchest:DIAMONDOBSIDIAN.name=Elmas Sandığı Obsidyen Sandığa Yükselt - -book.ironchest:dirtchest9000.title=Toprak Sandık-9000 Kullanım Kılavuzu -book.ironchest:dirtchest9000.page1=Yeni sandık olan Toprak Sandık-9000 yaptığınız için teÅŸekkürler.Bu sandık ile topraklarınızı depolayabilirsiniz. -book.ironchest:dirtchest9000.page2=Kullanımı: 64 adet toprak alarak içine koyunuz. Böylece sadece toprak depolanır. -book.ironchest:dirtchest9000.page3=Biz bu kılavuzu gözden keyif aldık umuyoruz, ve gelecekte ürünlerimizi kullanmayı düşünün umuyoruz! Saygılarımızla, dahil DirtChest 9000 manuel yazar. -book.ironchest:dirtchest9000.page4=Garanti: Bu ürün herhangi bir garanti vardır. Sizin kir depolanabilir deÄŸil, yavaÅŸ yavaÅŸ çevreye sülük olabilir, ya da alternatif olarak, hiç bir ÅŸey yapamazsınız. -book.ironchest:dirtchest9000.page5=Toprak Sandık-9000 çevreye türüdür. Sorumlu bu rehber kitap imha edin ve ne olursa olsun sadece bazı lav içine ayna yok yok. Bizim için çok üzücü olacaktır. diff --git a/src/main/resources/assets/ironchest/lang/zh_CN.lang b/src/main/resources/assets/ironchest/lang/zh_CN.lang deleted file mode 100755 index 974ada4f..00000000 --- a/src/main/resources/assets/ironchest/lang/zh_CN.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=é“ç®±å­ -tile.ironchest:GOLD.name=é‡‘ç®±å­ -tile.ironchest:DIAMOND.name=é’»çŸ³ç®±å­ -tile.ironchest:COPPER.name=é“œç®±å­ -tile.ironchest:SILVER.name=é“¶ç®±å­ -tile.ironchest:CRYSTAL.name=æ°´æ™¶ç®±å­ -tile.ironchest:OBSIDIAN.name=é»‘æ›œçŸ³ç®±å­ -tile.ironchest:DIRTCHEST9000.name=泥箱å­9000! - -item.ironchest:IRONGOLD.name=å‡çº§ï¼šé“>金 -item.ironchest:GOLDDIAMOND.name=å‡çº§ï¼šé‡‘>钻石 -item.ironchest:COPPERSILVER.name=å‡çº§ï¼šé“œ>é“¶ -item.ironchest:SILVERGOLD.name=å‡çº§ï¼šé“¶>金 -item.ironchest:COPPERIRON.name=å‡çº§ï¼šé“œ>é“ -item.ironchest:DIAMONDCRYSTAL.name=å‡çº§ï¼šé’»çŸ³>æ°´æ™¶ -item.ironchest:WOODIRON.name=å‡çº§ï¼šæœ¨>é“ -item.ironchest:WOODCOPPER.name=å‡çº§ï¼šæœ¨>铜 -item.ironchest:DIAMONDOBSIDIAN.name=å‡çº§ï¼šé’»çŸ³>黑曜石 - -book.ironchest:dirtchest9000.title=傻瓜也一定会用的泥箱å­9000! -book.ironchest:dirtchest9000.page1=欢迎使用这å°å…¨æ–°çš„æ³¥ç®±å­9000!希望你能愉快地常年使用我们的设备æ¥å‚¨å­˜(大é‡)泥土(大雾)。 -book.ironchest:dirtchest9000.page2=使用方法: æŠŠä¸€ç»„æ³¥åœŸä¸¢è¿›åŽ»å°±è¡Œäº†ã€‚æ¯æ¬¡æ‚¨ç»è¿‡çš„æ—¶å€™éƒ½å¯ä»¥æ‰“开它(很方便地)å–出æ¥ç”¨ã€‚ -book.ironchest:dirtchest9000.page3=希望您阅读本手册愉快,并选择使用我们的产å“。作为泥箱å­9000æ‰‹å†Œä½œè€…æˆ‘è°¨å‘æ‚¨è‡´ä»¥è¯šæŒšé—®å€™ã€‚ -book.ironchest:dirtchest9000.page4=è´¨é‡ä¿éšœ: æ•æœ¬äº§å“ä¸æä¾›ä»»ä½•è´¨é‡ä¿éšœã€‚æ‚¨çš„æ³¥åœŸæˆ–è€…èƒ½å®‰å…¨å­˜å‚¨å…¶å†…ï¼Œæˆ–è€…ä¼šé€æ¸æµå¤±åˆ°çŽ¯å¢ƒä¸­ï¼Œæˆ–è€…ä»€ä¹ˆä¹Ÿä¸ä¼šå‘生。(读者:我了个去!) -book.ironchest:dirtchest9000.page5=泥箱å­9000å分环ä¿ã€‚请å°å¿ƒæ”¶è—å¥½æœ¬æ‰‹å†Œï¼Œå¦‚æžœæ‚¨éšæ‰‹ä¸¢è¿›å²©æµ†çš„è¯ï¼Œæˆ‘们å¯ä¼šä¼¤å¿ƒçš„。 diff --git a/src/main/resources/assets/ironchest/lang/zh_TW.lang b/src/main/resources/assets/ironchest/lang/zh_TW.lang deleted file mode 100755 index d4755f69..00000000 --- a/src/main/resources/assets/ironchest/lang/zh_TW.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=éµç®± -tile.ironchest:GOLD.name=黃金箱 -tile.ironchest:DIAMOND.name=鑽石箱 -tile.ironchest:COPPER.name=銅箱 -tile.ironchest:SILVER.name=銀箱 -tile.ironchest:CRYSTAL.name=æ°´æ™¶ç®± -tile.ironchest:OBSIDIAN.name=黑曜石箱 -tile.ironchest:DIRTCHEST9000.name=泥土箱9000! - -item.ironchest:IRONGOLD.name=éµç®±å‡ç´šæˆé‡‘ç®± -item.ironchest:GOLDDIAMOND.name=金箱å‡ç´šæˆé‘½çŸ³ç®± -item.ironchest:COPPERSILVER.name=銅箱å‡ç´šæˆéŠ€ç®± -item.ironchest:SILVERGOLD.name=銀箱å‡ç´šæˆé‡‘ç®± -item.ironchest:COPPERIRON.name=銅箱å‡ç´šæˆéµç®± -item.ironchest:DIAMONDCRYSTAL.name=鑽石箱å‡ç´šæˆæ°´æ™¶ç®± -item.ironchest:WOODIRON.name=木箱å‡ç´šæˆéµç®± -item.ironchest:WOODCOPPER.name=木箱å‡ç´šæˆéŠ…ç®± -item.ironchest:DIAMONDOBSIDIAN.name=鑽石箱å‡ç´šæˆé»‘曜石箱 - -book.ironchest:dirtchest9000.title=笨蛋也一定會用的泥土箱9000! -book.ironchest:dirtchest9000.page1=歡迎使用這å°å…¨æ–°çš„æ³¥åœŸç®±9000!希望你能愉快地常年使用我們的設備來儲存泥土。 -book.ironchest:dirtchest9000.page2=ä½¿ç”¨æ–¹æ³•ï¼šæŠŠä¸€çµ„æ³¥åœŸä¸Ÿé€²åŽ»å°±è¡Œäº†ã€‚æ¯æ¬¡æ‚¨ç¶“éŽçš„æ™‚候都å¯ä»¥æ‰“開它很方便地å–出來用。 -book.ironchest:dirtchest9000.page3=å¸Œæœ›æ‚¨é–±è®€æœ¬æ‰‹å†Šæ„‰å¿«ï¼Œä¸¦é¸æ“‡ä½¿ç”¨æˆ‘們的產å“。作為泥土箱9000æ‰‹å†Šä½œè€…æˆ‘è¬¹å‘æ‚¨è‡´ä»¥èª æ‘¯å•候。 -book.ironchest:dirtchest9000.page4=質é‡ä¿éšœï¼šæ•本產å“ä¸æä¾›ä»»ä½•è³ªé‡ä¿éšœã€‚æ‚¨çš„æ³¥åœŸæˆ–è¨±èƒ½å®‰å…¨å­˜å„²å…¶å…§ï¼Œæˆ–è¨±æœƒé€æ¼¸æµå¤±åˆ°ç’°å¢ƒä¸­ï¼Œæˆ–è€…ä»€éº¼ä¹Ÿä¸æœƒç™¼ç”Ÿã€‚ -book.ironchest:dirtchest9000.page5=泥土箱9000å分環ä¿ã€‚è«‹å°å¿ƒæ”¶è—å¥½æœ¬æ‰‹å†Šï¼Œå¦‚æžœæ‚¨éš¨æ‰‹ä¸Ÿé€²å²©æ¼¿çš„è©±ï¼Œæˆ‘å€‘å¯æœƒå‚·å¿ƒçš„。 \ No newline at end of file diff --git a/src/main/resources/assets/ironchest/lang/zh_cn.json b/src/main/resources/assets/ironchest/lang/zh_cn.json new file mode 100644 index 00000000..f8be1c32 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/zh_cn.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "é“ç®±å­", + "block.ironchest.gold_chest": "金箱å­", + "block.ironchest.diamond_chest": "钻石箱å­", + "block.ironchest.copper_chest": "铜箱å­", + "block.ironchest.silver_chest": "é“¶ç®±å­", + "block.ironchest.crystal_chest": "æ°´æ™¶ç®±å­", + "block.ironchest.obsidian_chest": "黑曜石箱å­", + "block.ironchest.dirt_chest": "泥箱å­9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "å‡çº§ï¼šé“>金", + "item.ironchest.gold_to_diamond_chest_upgrade": "å‡çº§ï¼šé‡‘>钻石", + "item.ironchest.copper_to_silver_chest_upgrade": "å‡çº§ï¼šé“œ>é“¶", + "item.ironchest.silver_to_gold_chest_upgrade": "å‡çº§ï¼šé“¶>金", + "item.ironchest.copper_to_iron_chest_upgrade": "å‡çº§ï¼šé“œ>é“", + "item.ironchest.diamond_to_crystal_chest_upgrade": "å‡çº§ï¼šé’»çŸ³>æ°´æ™¶", + "item.ironchest.wood_to_iron_chest_upgrade": "å‡çº§ï¼šæœ¨>é“", + "item.ironchest.wood_to_copper_chest_upgrade": "å‡çº§ï¼šæœ¨>铜", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "å‡çº§ï¼šé’»çŸ³>黑曜石", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "傻瓜也一定会用的泥箱å­9000!", + "book.ironchest.dirtchest9000.page1": "欢迎使用这å°å…¨æ–°çš„æ³¥ç®±å­9000!希望你能愉快地常年使用我们的设备æ¥å‚¨å­˜(大é‡)泥土(大雾)。", + "book.ironchest.dirtchest9000.page2": "使用方法: æŠŠä¸€ç»„æ³¥åœŸä¸¢è¿›åŽ»å°±è¡Œäº†ã€‚æ¯æ¬¡æ‚¨ç»è¿‡çš„æ—¶å€™éƒ½å¯ä»¥æ‰“开它(很方便地)å–出æ¥ç”¨ã€‚", + "book.ironchest.dirtchest9000.page3": "希望您阅读本手册愉快,并选择使用我们的产å“。作为泥箱å­9000æ‰‹å†Œä½œè€…æˆ‘è°¨å‘æ‚¨è‡´ä»¥è¯šæŒšé—®å€™ã€‚", + "book.ironchest.dirtchest9000.page4": "è´¨é‡ä¿éšœ: æ•æœ¬äº§å“ä¸æä¾›ä»»ä½•è´¨é‡ä¿éšœã€‚æ‚¨çš„æ³¥åœŸæˆ–è€…èƒ½å®‰å…¨å­˜å‚¨å…¶å†…ï¼Œæˆ–è€…ä¼šé€æ¸æµå¤±åˆ°çŽ¯å¢ƒä¸­ï¼Œæˆ–è€…ä»€ä¹ˆä¹Ÿä¸ä¼šå‘生。(读者:我了个去!)", + "book.ironchest.dirtchest9000.page5": "泥箱å­9000å分环ä¿ã€‚请å°å¿ƒæ”¶è—å¥½æœ¬æ‰‹å†Œï¼Œå¦‚æžœæ‚¨éšæ‰‹ä¸¢è¿›å²©æµ†çš„è¯ï¼Œæˆ‘们å¯ä¼šä¼¤å¿ƒçš„。", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/zh_tw.json b/src/main/resources/assets/ironchest/lang/zh_tw.json new file mode 100644 index 00000000..6568c0d0 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/zh_tw.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "éµç®±", + "block.ironchest.gold_chest": "金箱", + "block.ironchest.diamond_chest": "鑽石箱", + "block.ironchest.copper_chest": "銅箱", + "block.ironchest.silver_chest": "銀箱", + "block.ironchest.crystal_chest": "æ°´æ™¶ç®±", + "block.ironchest.obsidian_chest": "黑曜石箱", + "block.ironchest.dirt_chest": "泥箱å­9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "éµç®±å‡ç´šæˆé‡‘ç®±", + "item.ironchest.gold_to_diamond_chest_upgrade": "金箱å‡ç´šæˆé‘½çŸ³ç®±", + "item.ironchest.copper_to_silver_chest_upgrade": "銅箱å‡ç´šæˆéŠ€ç®±", + "item.ironchest.silver_to_gold_chest_upgrade": "銀箱å‡ç´šæˆé‡‘ç®±", + "item.ironchest.copper_to_iron_chest_upgrade": "銅箱å‡ç´šæˆéµç®±", + "item.ironchest.diamond_to_crystal_chest_upgrade": "鑽石箱å‡ç´šæˆæ°´æ™¶ç®±", + "item.ironchest.wood_to_iron_chest_upgrade": "木箱å‡ç´šæˆéµç®±", + "item.ironchest.wood_to_copper_chest_upgrade": "木箱å‡ç´šæˆéŠ…ç®±", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "鑽石箱å‡ç´šæˆé»‘曜石箱", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "笨蛋也一定會用的泥土箱9000!", + "book.ironchest.dirtchest9000.page1": "歡迎使用全新的泥土箱9000!希望你能夠愉快地常年使用我們的設備來儲存泥土。", + "book.ironchest.dirtchest9000.page2": "使用方法: æŠŠä¸€çµ„æ³¥åœŸä¸Ÿé€²åŽ»å°±è¡Œäº†ã€‚æ¯æ¬¡æ‚¨ç¶“éŽçš„æ™‚候都å¯ä»¥æ‰“開它(很方便地)å–出來用", + "book.ironchest.dirtchest9000.page3": "我們希望您喜歡閱讀本說明手冊,並希望將來考慮使用我們的產å“ï¼ä½œç‚ºæ³¥ç®±å­9000æ‰‹å†Šä½œè€…æˆ‘è¬¹å‘æ‚¨è‡´ä»¥èª æ‘¯å•候。", + "book.ironchest.dirtchest9000.page4": "å“質ä¿éšœ: 本產å“䏿供任何形å¼çš„ä¿è­‰ã€‚您的泥土å¯èƒ½ä¸æœƒè¢«å­˜å„²ï¼Œå¯èƒ½æœƒæ…¢æ…¢æ»²å…¥ç’°å¢ƒä¸­ï¼Œæˆ–者根本無法åšä»»ä½•事情。", + "book.ironchest.dirtchest9000.page5": "泥箱å­9000å分環ä¿ã€‚è«‹å°å¿ƒæ”¶è—好本手冊,如果你隨手丟進岩漿的話,我們會很傷心。", + + "_comment": "Containers", + "ironchest.container.iron_chest": "éµç®±", + "ironchest.container.gold_chest": "金箱", + "ironchest.container.diamond_chest": "鑽石箱", + "ironchest.container.copper_chest": "銅箱", + "ironchest.container.silver_chest": "銀箱", + "ironchest.container.crystal_chest": "æ°´æ™¶ç®±", + "ironchest.container.obsidian_chest": "黑曜石箱", + "ironchest.container.dirt_chest": "泥箱å­9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/models/block/copper_chest.json b/src/main/resources/assets/ironchest/models/block/copper_chest.json new file mode 100644 index 00000000..e74d288f --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/copper_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/copper_chest", + "particle": "ironchest:block/copper_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/crystal_chest.json b/src/main/resources/assets/ironchest/models/block/crystal_chest.json new file mode 100644 index 00000000..edb2ce12 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/crystal_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/crystal_chest", + "particle": "ironchest:block/crystal_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/diamond_chest.json b/src/main/resources/assets/ironchest/models/block/diamond_chest.json new file mode 100644 index 00000000..c257ff56 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/diamond_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/diamond_chest", + "particle": "ironchest:block/diamond_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_crystal.json b/src/main/resources/assets/ironchest/models/block/dirt_chest.json old mode 100755 new mode 100644 similarity index 94% rename from src/main/resources/assets/ironchest/models/item/chest_crystal.json rename to src/main/resources/assets/ironchest/models/block/dirt_chest.json index ff0c8239..0f87c3d0 --- a/src/main/resources/assets/ironchest/models/item/chest_crystal.json +++ b/src/main/resources/assets/ironchest/models/block/dirt_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/crystalchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/dirt_chest", + "particle": "minecraft:block/dirt" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json b/src/main/resources/assets/ironchest/models/block/gold_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json rename to src/main/resources/assets/ironchest/models/block/gold_chest.json index d2947cdb..0b1e05fd --- a/src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json +++ b/src/main/resources/assets/ironchest/models/block/gold_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/dirtchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/gold_chest", + "particle": "ironchest:block/gold_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_copper.json b/src/main/resources/assets/ironchest/models/block/iron_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_copper.json rename to src/main/resources/assets/ironchest/models/block/iron_chest.json index 488cab4f..fc7ee550 --- a/src/main/resources/assets/ironchest/models/item/chest_copper.json +++ b/src/main/resources/assets/ironchest/models/block/iron_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/copperchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/iron_chest", + "particle": "ironchest:block/iron_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_diamond.json b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_diamond.json rename to src/main/resources/assets/ironchest/models/block/obsidian_chest.json index 89505152..4f53d0de --- a/src/main/resources/assets/ironchest/models/item/chest_diamond.json +++ b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/diamondchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/obsidian_chest", + "particle": "minecraft:block/obsidian" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_copper_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_copper_chest.json new file mode 100644 index 00000000..50eee162 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_copper_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_copper_chest", + "particle": "ironchest:block/copper_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_crystal_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_crystal_chest.json new file mode 100644 index 00000000..3633c2ba --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_crystal_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_crystal_chest", + "particle": "ironchest:block/crystal_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_diamond_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_diamond_chest.json new file mode 100644 index 00000000..0bc13de4 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_diamond_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_diamond_chest", + "particle": "ironchest:block/diamond_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_dirt_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_dirt_chest.json new file mode 100644 index 00000000..0b9a3df6 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_dirt_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_dirt_chest", + "particle": "minecraft:block/dirt" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_gold_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_gold_chest.json new file mode 100644 index 00000000..fe06988e --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_gold_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_gold_chest", + "particle": "ironchest:block/gold_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_iron_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_iron_chest.json new file mode 100644 index 00000000..ff8fe1b3 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_iron_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_iron_chest", + "particle": "ironchest:block/iron_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/trapped_obsidian_chest.json b/src/main/resources/assets/ironchest/models/block/trapped_obsidian_chest.json new file mode 100644 index 00000000..34bd7de7 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/trapped_obsidian_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/trapped_obsidian_chest", + "particle": "minecraft:block/obsidian" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_gold.json b/src/main/resources/assets/ironchest/models/item/chest_gold.json deleted file mode 100755 index 5260625c..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_gold.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/goldchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_iron.json b/src/main/resources/assets/ironchest/models/item/chest_iron.json deleted file mode 100755 index 2c63365f..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_iron.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/ironchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_obsidian.json b/src/main/resources/assets/ironchest/models/item/chest_obsidian.json deleted file mode 100755 index b13d0189..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_obsidian.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/obsidianchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_silver.json b/src/main/resources/assets/ironchest/models/item/chest_silver.json deleted file mode 100755 index 43fdd95b..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_silver.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/silverchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json b/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json deleted file mode 100644 index 3ef545ee..00000000 --- a/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/copperIronUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json b/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json deleted file mode 100755 index 01941656..00000000 --- a/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/copperSilverUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/copper_chest.json b/src/main/resources/assets/ironchest/models/item/copper_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/copper_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json new file mode 100644 index 00000000..3926f7a4 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/copper_iron_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/crystal_chest.json b/src/main/resources/assets/ironchest/models/item/crystal_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/crystal_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json b/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json deleted file mode 100644 index 846f6e92..00000000 --- a/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/diamondCrystalUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json b/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json deleted file mode 100644 index 04e94ba3..00000000 --- a/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/diamondObsidianUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_chest.json b/src/main/resources/assets/ironchest/models/item/diamond_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json new file mode 100644 index 00000000..db18ca6a --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/diamond_crystal_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json new file mode 100644 index 00000000..bd507f42 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/diamond_obsidian_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/dirt_chest.json b/src/main/resources/assets/ironchest/models/item/dirt_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/dirt_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json b/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json deleted file mode 100755 index 0a0e6269..00000000 --- a/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/goldDiamondUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/gold_chest.json b/src/main/resources/assets/ironchest/models/item/gold_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/gold_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json new file mode 100644 index 00000000..62eec1fb --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/gold_diamond_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json b/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json deleted file mode 100755 index 4579f8a4..00000000 --- a/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/ironGoldUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/iron_chest.json b/src/main/resources/assets/ironchest/models/item/iron_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/iron_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json new file mode 100644 index 00000000..7691286c --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/iron_gold_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/obsidian_chest.json b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json b/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json deleted file mode 100755 index 62351b24..00000000 --- a/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/silverGoldUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_copper_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_copper_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_copper_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_crystal_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_crystal_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_crystal_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_diamond_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_diamond_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_diamond_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_dirt_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_dirt_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_dirt_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_gold_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_gold_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_gold_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_iron_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_iron_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_iron_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/trapped_obsidian_chest.json b/src/main/resources/assets/ironchest/models/item/trapped_obsidian_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/trapped_obsidian_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json b/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json deleted file mode 100644 index 51918f77..00000000 --- a/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/woodCopperUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json b/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json deleted file mode 100644 index 84e149dc..00000000 --- a/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/woodIronUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json new file mode 100644 index 00000000..9195b8d5 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/wood_copper_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json new file mode 100644 index 00000000..91ed0269 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/wood_iron_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/textures/gui/coppercontainer.png b/src/main/resources/assets/ironchest/textures/block/copper_break.png old mode 100755 new mode 100644 similarity index 71% rename from src/main/resources/assets/ironchest/textures/gui/coppercontainer.png rename to src/main/resources/assets/ironchest/textures/block/copper_break.png index 2fdb824e..7cfb64f6 Binary files a/src/main/resources/assets/ironchest/textures/gui/coppercontainer.png and b/src/main/resources/assets/ironchest/textures/block/copper_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/ironcontainer.png b/src/main/resources/assets/ironchest/textures/block/crystal_break.png old mode 100755 new mode 100644 similarity index 70% rename from src/main/resources/assets/ironchest/textures/gui/ironcontainer.png rename to src/main/resources/assets/ironchest/textures/block/crystal_break.png index 1c48eed8..44d3939d Binary files a/src/main/resources/assets/ironchest/textures/gui/ironcontainer.png and b/src/main/resources/assets/ironchest/textures/block/crystal_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png b/src/main/resources/assets/ironchest/textures/block/diamond_break.png old mode 100755 new mode 100644 similarity index 70% rename from src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png rename to src/main/resources/assets/ironchest/textures/block/diamond_break.png index b53f4729..850ebd21 Binary files a/src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png and b/src/main/resources/assets/ironchest/textures/block/diamond_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/silvercontainer.png b/src/main/resources/assets/ironchest/textures/block/gold_break.png old mode 100755 new mode 100644 similarity index 68% rename from src/main/resources/assets/ironchest/textures/gui/silvercontainer.png rename to src/main/resources/assets/ironchest/textures/block/gold_break.png index 65179f2a..24074dd6 Binary files a/src/main/resources/assets/ironchest/textures/gui/silvercontainer.png and b/src/main/resources/assets/ironchest/textures/block/gold_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/block/iron_break.png b/src/main/resources/assets/ironchest/textures/block/iron_break.png new file mode 100644 index 00000000..a7675b2d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/iron_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/block/silver_break.png b/src/main/resources/assets/ironchest/textures/block/silver_break.png new file mode 100644 index 00000000..531bc946 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/silver_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/copper_container.png b/src/main/resources/assets/ironchest/textures/gui/copper_container.png new file mode 100644 index 00000000..41197b8d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/copper_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/diamond_container.png b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png new file mode 100644 index 00000000..cdcafc91 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/dirtcontainer.png b/src/main/resources/assets/ironchest/textures/gui/dirt_container.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/gui/dirtcontainer.png rename to src/main/resources/assets/ironchest/textures/gui/dirt_container.png diff --git a/src/main/resources/assets/ironchest/textures/gui/gold_container.png b/src/main/resources/assets/ironchest/textures/gui/gold_container.png new file mode 100644 index 00000000..37c35b40 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/gold_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png b/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png deleted file mode 100755 index 27f506fa..00000000 Binary files a/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/gui/iron_container.png b/src/main/resources/assets/ironchest/textures/gui/iron_container.png new file mode 100644 index 00000000..d95c78a3 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/iron_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/silver_container.png b/src/main/resources/assets/ironchest/textures/gui/silver_container.png new file mode 100644 index 00000000..b182f90d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/silver_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png b/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png new file mode 100644 index 00000000..594fb736 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png new file mode 100644 index 00000000..169e6834 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/diamond_netherite_upgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_netherite_upgrade.png new file mode 100644 index 00000000..c46b98b8 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/diamond_netherite_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png new file mode 100644 index 00000000..afcb9ba5 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png b/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png new file mode 100644 index 00000000..baef4dab Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png b/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png new file mode 100644 index 00000000..9d9d6d8b Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png new file mode 100644 index 00000000..9bc86105 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png new file mode 100644 index 00000000..930cb5e1 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png differ diff --git a/src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png b/src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png deleted file mode 100755 index 7bb21593..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/copperSilverUpgrade.png b/src/main/resources/assets/ironchest/textures/items/copperSilverUpgrade.png deleted file mode 100755 index de87597d..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/copperSilverUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/diamondCrystalUpgrade.png b/src/main/resources/assets/ironchest/textures/items/diamondCrystalUpgrade.png deleted file mode 100755 index 68caa0c5..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/diamondCrystalUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/diamondObsidianUpgrade.png b/src/main/resources/assets/ironchest/textures/items/diamondObsidianUpgrade.png deleted file mode 100755 index dd1a36d1..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/diamondObsidianUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/goldDiamondUpgrade.png b/src/main/resources/assets/ironchest/textures/items/goldDiamondUpgrade.png deleted file mode 100755 index 028e2d8b..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/goldDiamondUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/ironGoldUpgrade.png b/src/main/resources/assets/ironchest/textures/items/ironGoldUpgrade.png deleted file mode 100755 index 65cf6aee..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/ironGoldUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/silverGoldUpgrade.png b/src/main/resources/assets/ironchest/textures/items/silverGoldUpgrade.png deleted file mode 100755 index d3cad2e2..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/silverGoldUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/woodCopperUpgrade.png b/src/main/resources/assets/ironchest/textures/items/woodCopperUpgrade.png deleted file mode 100755 index 4273a546..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/woodCopperUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/items/woodIronUpgrade.png b/src/main/resources/assets/ironchest/textures/items/woodIronUpgrade.png deleted file mode 100755 index e6e62bb9..00000000 Binary files a/src/main/resources/assets/ironchest/textures/items/woodIronUpgrade.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/copper_chest.png b/src/main/resources/assets/ironchest/textures/model/copper_chest.png new file mode 100644 index 00000000..9e773a9a Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/copper_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/copperchest.png b/src/main/resources/assets/ironchest/textures/model/copperchest.png deleted file mode 100755 index a008864f..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/copperchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/crystal_chest.png b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png new file mode 100644 index 00000000..7a29df11 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/crystalchest.png b/src/main/resources/assets/ironchest/textures/model/crystalchest.png deleted file mode 100755 index a455ce86..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/crystalchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/diamond_chest.png b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png new file mode 100644 index 00000000..6841b472 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/diamondchest.png b/src/main/resources/assets/ironchest/textures/model/diamondchest.png deleted file mode 100755 index 64020b57..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/diamondchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/dirt_chest.png b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png new file mode 100644 index 00000000..0feb4ee5 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/dirtchest.png b/src/main/resources/assets/ironchest/textures/model/dirtchest.png deleted file mode 100755 index 168e1799..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/dirtchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/gold_chest.png b/src/main/resources/assets/ironchest/textures/model/gold_chest.png new file mode 100644 index 00000000..29f37a36 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/gold_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/goldchest.png b/src/main/resources/assets/ironchest/textures/model/goldchest.png deleted file mode 100755 index 7f184689..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/goldchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/iron_chest.png b/src/main/resources/assets/ironchest/textures/model/iron_chest.png new file mode 100644 index 00000000..0ac16fec Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/iron_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/ironchest.png b/src/main/resources/assets/ironchest/textures/model/ironchest.png deleted file mode 100755 index df883fff..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/ironchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/netherite_chest.png b/src/main/resources/assets/ironchest/textures/model/netherite_chest.png new file mode 100644 index 00000000..f301a243 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/netherite_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png new file mode 100644 index 00000000..5e27b575 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/obsidianchest.png b/src/main/resources/assets/ironchest/textures/model/obsidianchest.png deleted file mode 100755 index 4f0657ab..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/obsidianchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/silverchest.png b/src/main/resources/assets/ironchest/textures/model/silverchest.png deleted file mode 100755 index 780becd8..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/silverchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_copper_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_copper_chest.png new file mode 100644 index 00000000..ae239a98 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_copper_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_crystal_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_crystal_chest.png new file mode 100644 index 00000000..e078608c Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_crystal_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_diamond_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_diamond_chest.png new file mode 100644 index 00000000..7fb3e981 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_diamond_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_dirt_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_dirt_chest.png new file mode 100644 index 00000000..f77e4a60 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_dirt_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_gold_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_gold_chest.png new file mode 100644 index 00000000..b638149b Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_gold_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_iron_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_iron_chest.png new file mode 100644 index 00000000..bed34f13 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_iron_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_netherite_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_netherite_chest.png new file mode 100644 index 00000000..d93b61de Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_netherite_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/trapped_obsidian_chest.png b/src/main/resources/assets/ironchest/textures/model/trapped_obsidian_chest.png new file mode 100644 index 00000000..d79a21ee Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/trapped_obsidian_chest.png differ diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json new file mode 100644 index 00000000..27d00f0f --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:copper_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:copper_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json new file mode 100644 index 00000000..96134727 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:crystal_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:crystal_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json new file mode 100644 index 00000000..00ee9e45 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:diamond_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:diamond_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json new file mode 100644 index 00000000..c8db1bf6 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:dirt_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + }, + { + "function": "minecraft:set_nbt", + "tag": "{been_placed:1}" + } + ], + "name": "ironchest:dirt_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json new file mode 100644 index 00000000..9691196b --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:gold_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:gold_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json new file mode 100644 index 00000000..f1448bce --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:iron_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:iron_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json new file mode 100644 index 00000000..f348abeb --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:obsidian_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:obsidian_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_copper_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_copper_chest.json new file mode 100644 index 00000000..97011282 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_copper_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_copper_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_copper_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_crystal_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_crystal_chest.json new file mode 100644 index 00000000..018a799a --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_crystal_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_crystal_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_crystal_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_diamond_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_diamond_chest.json new file mode 100644 index 00000000..9e81450b --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_diamond_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_diamond_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_diamond_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_dirt_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_dirt_chest.json new file mode 100644 index 00000000..c23d76b4 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_dirt_chest.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_dirt_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + }, + { + "function": "minecraft:set_nbt", + "tag": "{been_placed:1}" + } + ], + "name": "ironchest:trapped_dirt_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_gold_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_gold_chest.json new file mode 100644 index 00000000..19af3e2b --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_gold_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_gold_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_gold_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_iron_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_iron_chest.json new file mode 100644 index 00000000..6476e13d --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_iron_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_iron_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_iron_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/trapped_obsidian_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_obsidian_chest.json new file mode 100644 index 00000000..4588b579 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/trapped_obsidian_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:trapped_obsidian_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:trapped_obsidian_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/itemsheet.xcf b/src/main/resources/itemsheet.xcf deleted file mode 100755 index 47073b83..00000000 Binary files a/src/main/resources/itemsheet.xcf and /dev/null differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100755 index c2a7c0a6..00000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,21 +0,0 @@ -[ -{ - "modid": "IronChest", - "name": "Iron Chest", - "description": "New chests with larger sizes, with in-place upgrade items.\nThe feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest", - "version": "${version}", - "mcversion": "${mcversion}", - "url": "http://www.minecraftforum.net/topic/981855-", - "updateUrl": "", - "authors": [ - "cpw" - ], - "credits": "By cpw, based on an original idea by Lishid", - "logoFile": "", - "screenshots": [ - ], - "parent":"", - "dependencies": [ - ] -} -] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..6cbad81c --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "Iron Chests Resources", + "pack_format": 7 + } +} diff --git a/src/main/resources/texturesheet.xcf b/src/main/resources/texturesheet.xcf deleted file mode 100755 index a0730b0b..00000000 Binary files a/src/main/resources/texturesheet.xcf and /dev/null differ