Compare commits
121 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcba2329b7 | |||
| 597e17b52b | |||
| 4b055a7f21 | |||
| 759b6daa59 | |||
| e1f03db7b3 | |||
| 72518ad977 | |||
| 21fa2718f8 | |||
| 777bec184a | |||
| b9d615c4ba | |||
| 40d339e173 | |||
| 20c1c4529a | |||
| 72399e5789 | |||
| f303c17ae0 | |||
| 26f13d4109 | |||
| 0df445c6a8 | |||
| 8c817b2f85 | |||
| 7bd8cf3f59 | |||
| 3ab6758e6c | |||
| 3dd948e4a4 | |||
| 3bb9e4df97 | |||
| d17f045339 | |||
| 5817cde56b | |||
| 45d94d4c2c | |||
| d893e52eb0 | |||
| 464a56ffc5 | |||
| 40dcf711f6 | |||
| 5dfca5eb93 | |||
| 26daaf2232 | |||
| c2022a7208 | |||
| 74c2e1fab9 | |||
| 0de7a2d83a | |||
| 517a832ac1 | |||
| 1ecc811559 | |||
| 7dd283cf9f | |||
| a12ef1e534 | |||
| a567dcc026 | |||
| 7f72ba97f0 | |||
| c3db5ef9e4 | |||
| f955febb5d | |||
| 3115147edf | |||
| 1cec5922a0 | |||
| 322b296639 | |||
| d1244f59ed | |||
| 6a18102ea0 | |||
| 300a9618b6 | |||
| dfb435ae7d | |||
| 1728f683c3 | |||
| c0b62fd519 | |||
| 67c901966e | |||
| a5287f6779 | |||
| 8234c6dbb5 | |||
| 9c8deac9de | |||
| c21a44d8c0 | |||
| 3c62734c87 | |||
| 5b6b14cde7 | |||
| 51c92d3dfb | |||
| 37295745cf | |||
| c3ce9d9542 | |||
| 15993eb3c7 | |||
| 48d1a5aa88 | |||
| 3826b3b51f | |||
| 7833ff5eab | |||
| 6f5a2888c0 | |||
| 6d42032738 | |||
| 1a38e5ba94 | |||
| ff3e51018f | |||
| 65c47d4c4e | |||
| d7486fec3c | |||
| 796b6dc7a2 | |||
| 67b261cc7c | |||
| 3fb3f70392 | |||
| 49321d72c1 | |||
| 62fb0dc7f7 | |||
| e9e9535f2a | |||
| ab9f4e7fd7 | |||
| 1080b65404 | |||
| c823e1464b | |||
| 4ba722cb51 | |||
| 91b8d30a15 | |||
| 3e6231492e | |||
| 1c2df4f380 | |||
| 3f013c8d1d | |||
| 4e46dc08af | |||
| f5e3ae8949 | |||
| b2c31e20b2 | |||
| cd0aec123d | |||
| 3844f3af87 | |||
| 1cc118c927 | |||
| afd1d4e21e | |||
| 77597973e7 | |||
| 4acec30a66 | |||
| ab32b2b357 | |||
| 8b7aea9f14 | |||
| db4a6c6cc0 | |||
| c6383f21c5 | |||
| 85de600d16 | |||
| 944f434993 | |||
| 6b47bf3ce8 | |||
| 60aa74d19f | |||
| e5f59e0a00 | |||
| 2ba4f312d4 | |||
| 2274ca79e4 | |||
| a75dee0d08 | |||
| 349ac7e0a0 | |||
| b5d0db493b | |||
| 256c0258bb | |||
| 73ffbb268a | |||
| 69299a6b1d | |||
| d1e4ea6579 | |||
| f0bf72bc34 | |||
| 7fc538fc99 | |||
| acc3bb6a29 | |||
| 71ce42f26a | |||
| cb013cf55b | |||
| 57836848ae | |||
| 53c4529d7a | |||
| e3a0b34767 | |||
| 5aaaeb6d42 | |||
| e1ff0fe5ef | |||
| 86e5d6f5da | |||
| 05f90760f2 |
+29
-16
@@ -11,20 +11,32 @@ top of things.
|
|||||||
|
|
||||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||||
|
|
||||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
|
||||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
|
||||||
3. Click new issue
|
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
|
||||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
|
||||||
* To help in resolving your issues please try to include the follow if applicable:
|
* The following details are required. Not including them can cause the issue to be closed.
|
||||||
* The problem that is happening?
|
* Forge version
|
||||||
* What was expected?
|
* AE2 version
|
||||||
* How to reproduce the problem?
|
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
|
||||||
* Server or Single Player?
|
* Do not post an excerpt of what you consider important, instead:
|
||||||
* Mod Pack using and version?
|
* Post the full log
|
||||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
* Other mods and their version, when reporting an issue between AE and another mod
|
||||||
* Screen shots or Pictures of the problem
|
* Also consider updating these before submitting a new issue, it might be already fixed
|
||||||
|
* A detailed description of the bug or feature
|
||||||
|
* To further help in resolving your issues please try to include the follow if applicable:
|
||||||
|
* What was expected?
|
||||||
|
* How to reproduce the problem?
|
||||||
|
* This is usually a great detail and allows us to fix it way faster
|
||||||
|
* Server or Single Player?
|
||||||
|
* Screen shots or Pictures of the problem
|
||||||
|
* Mod Pack using and version?
|
||||||
|
* Keep in mind that some mods might use an outdated version of AE2
|
||||||
|
* If so you should report it to your modpack
|
||||||
5. Click `Submit New Issue`, and wait for feedback!
|
5. Click `Submit New Issue`, and wait for feedback!
|
||||||
|
|
||||||
|
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
|
||||||
|
|
||||||
### Submitting Changes
|
### Submitting Changes
|
||||||
|
|
||||||
* Submit an issue to the github project, assuming one does not already exist.
|
* Submit an issue to the github project, assuming one does not already exist.
|
||||||
@@ -55,10 +67,8 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
|
|||||||
from our issue tracker. The body describes the behavior without the patch,
|
from our issue tracker. The body describes the behavior without the patch,
|
||||||
why this is a problem, and how the patch fixes the problem when applied.
|
why this is a problem, and how the patch fixes the problem when applied.
|
||||||
````
|
````
|
||||||
* Always fully test your changes. If they are large engouh in scope, then fully
|
* Always fully test your changes. If they are large engouh in scope, then fully test AE2.
|
||||||
test AE2.
|
* Describing the process you used to test your changes in detail will help speed up this process.
|
||||||
* Describing the process you used to test your changes in detail will help speed
|
|
||||||
up this process.
|
|
||||||
|
|
||||||
## Making Trivial Changes
|
## Making Trivial Changes
|
||||||
|
|
||||||
@@ -97,6 +107,9 @@ the styling guidelines used by AE.
|
|||||||
|
|
||||||
PRs that do not conform to these standards will be rejected.
|
PRs that do not conform to these standards will be rejected.
|
||||||
|
|
||||||
|
You can find presets for Eclipse and IntelliJ IDEA in the `codeformat` folder.
|
||||||
|
We try to keep them up to date, but in case you find them not formatting it correctly, then please report it
|
||||||
|
|
||||||
### Whitespace
|
### Whitespace
|
||||||
|
|
||||||
#### Tabs or spaces
|
#### Tabs or spaces
|
||||||
|
|||||||
@@ -54,20 +54,32 @@ You install this mod by putting it into the `minecraft/mods/` folder. It has no
|
|||||||
|
|
||||||
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue now!
|
||||||
|
|
||||||
1. Make sure your issue hasn't already been answered or fixed. Also think about whether your issue is a valid one before submitting it.
|
1. Make sure your issue has not already been answered or fixed and you are using the latest version. Also think about whether your issue is a valid one before submitting it.
|
||||||
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues)
|
2. Go to [the issues page](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues) and click [new issue](https://github.com/AppliedEnergistics/Applied-Energistics-2/issues/new)
|
||||||
3. Click new issue
|
3. Enter your a title of your issue (something that summarizes your issue), and then create a detailed description of the issue.
|
||||||
4. Enter your Issue's title (something that summarizes your issue), and then create a detailed description of the issue.
|
* Do not tag it with something like `[Feature]` or `[Bug]`. When it is applicable, we will take care of it.
|
||||||
* To help in resolving your issues please try to include the follow if applicable:
|
* The following details are required. Not including them can cause the issue to be closed.
|
||||||
* The problem that is happening?
|
* Forge version
|
||||||
* What was expected?
|
* AE2 version
|
||||||
* How to reproduce the problem?
|
* Crash log, when reporting a crash (Please make sure to use [pastebin](http://pastebin.com/))
|
||||||
* Server or Single Player?
|
* Do not post an excerpt of what you consider important, instead:
|
||||||
* Mod Pack using and version?
|
* Post the full log
|
||||||
* Crash log (Please make sure to use [pastebin](http://pastebin.com/) for the log file)
|
* Other mods and their version, when reporting an issue between AE and another mod
|
||||||
* Screen shots or Pictures of the problem
|
* Also consider updating these before submitting a new issue, it might be already fixed
|
||||||
|
* A detailed description of the bug or feature
|
||||||
|
* To further help in resolving your issues please try to include the follow if applicable:
|
||||||
|
* What was expected?
|
||||||
|
* How to reproduce the problem?
|
||||||
|
* This is usually a great detail and allows us to fix it way faster
|
||||||
|
* Server or Single Player?
|
||||||
|
* Screen shots or Pictures of the problem
|
||||||
|
* Mod Pack using and version?
|
||||||
|
* Keep in mind that some mods might use an outdated version of AE2
|
||||||
|
* If so you should report it to your modpack
|
||||||
5. Click `Submit New Issue`, and wait for feedback!
|
5. Click `Submit New Issue`, and wait for feedback!
|
||||||
|
|
||||||
|
Providing as many details as possible does help us to find and resolve the issue faster and also you getting a fixed version as fast as possible.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
1. Clone this repository via
|
1. Clone this repository via
|
||||||
@@ -90,6 +102,8 @@ Applied Energistics 2 crashing, have a suggestion, found a bug? Create an issue
|
|||||||
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
|
Before you want to add major changes, you might want to discuss them with us first, before wasting your time.
|
||||||
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
|
If you are still willing to contribute to this project, you can contribute via [Pull-Request](https://help.github.com/articles/creating-a-pull-request).
|
||||||
|
|
||||||
|
The [guidelines for contributing](https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/master/CONTRIBUTING.md) contain more detailed information about topics like the used code style and should also be considered.
|
||||||
|
|
||||||
Here are a few things to keep in mind that will help get your PR approved.
|
Here are a few things to keep in mind that will help get your PR approved.
|
||||||
|
|
||||||
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
|
* A PR should be focused on content. Any PRs where the changes are only syntax will be rejected.
|
||||||
@@ -127,7 +141,7 @@ Development and standard builds can be obtained [Here](http://ae2.ae-mod.info/Do
|
|||||||
When compiling against the AE2 API you can use gradle dependencies, just add
|
When compiling against the AE2 API you can use gradle dependencies, just add
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
|
compile "appeng:appliedenergistics2:rv_-_____-__:dev"
|
||||||
}
|
}
|
||||||
|
|
||||||
or add the compile line to your existing dependencies task to your build.gradle
|
or add the compile line to your existing dependencies task to your build.gradle
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ sourceSets {
|
|||||||
|
|
||||||
resources {
|
resources {
|
||||||
srcDir "src/main/resources/"
|
srcDir "src/main/resources/"
|
||||||
include "assets/appliedenergistics2/recipes/*.recipe",
|
include "assets/appliedenergistics2/recipes/**/*.recipe",
|
||||||
"assets/appliedenergistics2/recipes/README.html",
|
"assets/appliedenergistics2/recipes/README.html",
|
||||||
"assets/appliedenergistics2/lang/*.lang",
|
"assets/appliedenergistics2/lang/*.lang",
|
||||||
"assets/appliedenergistics2/textures/blocks/*",
|
"assets/appliedenergistics2/textures/blocks/*",
|
||||||
|
|||||||
Binary file not shown.
@@ -1,10 +0,0 @@
|
|||||||
#Organize Import Order
|
|
||||||
#Thu Oct 09 12:52:21 CEST 2014
|
|
||||||
6=
|
|
||||||
5=cpw
|
|
||||||
4=net
|
|
||||||
3=io
|
|
||||||
2=org
|
|
||||||
1=com
|
|
||||||
0=java
|
|
||||||
7=appeng
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<profiles version="12">
|
<profiles version="12">
|
||||||
<profile kind="CodeFormatterProfile" name="Algo" version="12">
|
<profile kind="CodeFormatterProfile" name="AE2" version="12">
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="do not insert"/>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/>
|
||||||
@@ -37,13 +37,13 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="2"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
|
||||||
@@ -72,14 +72,14 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="0"/>
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
|
<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/>
|
||||||
@@ -122,13 +122,13 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="insert"/>
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/>
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
|
<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/>
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
|
<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="0"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
|
<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/>
|
||||||
@@ -215,7 +215,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="insert"/>
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="true"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="insert"/>
|
||||||
@@ -267,8 +267,8 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
|
<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="1"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="insert"/>
|
||||||
@@ -283,13 +283,13 @@
|
|||||||
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
|
<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
|
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="false"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
|
<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="160"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="insert"/>
|
||||||
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
|
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="do not insert"/>
|
||||||
</profile>
|
</profile>
|
||||||
</profiles>
|
</profiles>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
#Organize Import Order
|
||||||
|
#Sat Jun 13 15:22:41 CEST 2015
|
||||||
|
8=appeng
|
||||||
|
7=
|
||||||
|
6=cpw
|
||||||
|
5=net
|
||||||
|
4=io
|
||||||
|
3=org
|
||||||
|
2=com
|
||||||
|
1=javax
|
||||||
|
0=java
|
||||||
+12
-11
@@ -1,5 +1,5 @@
|
|||||||
aeversion=rv2
|
aeversion=rv3
|
||||||
aechannel=stable
|
aechannel=alpha
|
||||||
aebuild=0
|
aebuild=0
|
||||||
aegroup=appeng
|
aegroup=appeng
|
||||||
aebasename=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
@@ -8,15 +8,15 @@ aebasename=appliedenergistics2
|
|||||||
# Versions #
|
# Versions #
|
||||||
#########################################################
|
#########################################################
|
||||||
minecraft_version=1.7.10
|
minecraft_version=1.7.10
|
||||||
forge_version=10.13.2.1291
|
forge_version=10.13.4.1448-1.7.10
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Installable #
|
# Installable #
|
||||||
#########################################################
|
#########################################################
|
||||||
waila_version=1.5.10
|
waila_version=1.5.10
|
||||||
jabba_version=1.2.1a
|
jabba_version=1.2.1a
|
||||||
enderstorage_version=1.4.7.33
|
enderstorage_version=1.4.7.36
|
||||||
translocator_version=1.1.1.14
|
translocator_version=1.1.2.15
|
||||||
ic2_version=2.2.717
|
ic2_version=2.2.717
|
||||||
enderio_version=2.3.0.375_beta
|
enderio_version=2.3.0.375_beta
|
||||||
#cofhlib_version=1.0.1-157
|
#cofhlib_version=1.0.1-157
|
||||||
@@ -29,12 +29,13 @@ invtweaks_version=1.58
|
|||||||
#########################################################
|
#########################################################
|
||||||
# Provided APIs #
|
# Provided APIs #
|
||||||
#########################################################
|
#########################################################
|
||||||
fmp_version=1.1.1.324
|
fmp_version=1.2.0.345
|
||||||
code_chicken_lib_version=1.1.3.127
|
code_chicken_lib_version=1.1.3.138
|
||||||
code_chicken_core_version=1.0.4.35
|
code_chicken_core_version=1.0.7.46
|
||||||
nei_version=1.0.4.90
|
nei_version=1.0.5.111
|
||||||
bc_version=6.4.6
|
bc_version=7.0.9
|
||||||
opencomputers_version=1.5.9.21
|
opencomputers_version=1.5.12.26
|
||||||
|
pneumaticcraft_version=1.9.15-105
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Self Compiled APIs #
|
# Self Compiled APIs #
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||||
@@ -55,6 +56,16 @@ repositories {
|
|||||||
url = "http://maven.cil.li/"
|
url = "http://maven.cil.li/"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
name = "MM repo"
|
||||||
|
url = "http://maven.k-4u.nl/"
|
||||||
|
}
|
||||||
|
|
||||||
|
ivy {
|
||||||
|
name "BuildCraft"
|
||||||
|
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||||
|
}
|
||||||
|
|
||||||
// CurseForge DNS for TE is not available or I am just being unlucky, code part can stay since this is applicable to any other curseforge mod though
|
// CurseForge DNS for TE is not available or I am just being unlucky, code part can stay since this is applicable to any other curseforge mod though
|
||||||
// ivy {
|
// ivy {
|
||||||
// name = "CoFHLib"
|
// name = "CoFHLib"
|
||||||
@@ -103,6 +114,7 @@ dependencies {
|
|||||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
||||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||||
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
||||||
|
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
|
||||||
|
|
||||||
// provided APIs
|
// provided APIs
|
||||||
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
|
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
#Sat May 16 13:19:14 CEST 2015
|
#Mon Aug 31 16:41:19 CEST 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2013 AlgorithmX2
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package appeng.api.config;
|
||||||
|
|
||||||
|
|
||||||
|
public enum SchedulingMode
|
||||||
|
{
|
||||||
|
DEFAULT, ROUNDROBIN, RANDOM
|
||||||
|
}
|
||||||
@@ -54,13 +54,15 @@ public enum Settings
|
|||||||
|
|
||||||
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||||
|
|
||||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||||
|
|
||||||
|
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
|
||||||
|
|
||||||
private final EnumSet<? extends Enum<?>> values;
|
private final EnumSet<? extends Enum<?>> values;
|
||||||
|
|
||||||
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
|
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
|
||||||
{
|
{
|
||||||
if ( possibleOptions.isEmpty() )
|
if( possibleOptions.isEmpty() )
|
||||||
{
|
{
|
||||||
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
|
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,5 +34,6 @@ public enum TunnelType
|
|||||||
ITEM, // Item Tunnel
|
ITEM, // Item Tunnel
|
||||||
LIGHT, // Light Tunnel
|
LIGHT, // Light Tunnel
|
||||||
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
|
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
|
||||||
COMPUTER_MESSAGE // Computer Message Tunnel
|
COMPUTER_MESSAGE, // Computer Message Tunnel
|
||||||
|
PRESSURE // PneumaticCraft Tunnel
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* The MIT License (MIT)
|
||||||
|
*
|
||||||
|
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
|
* the Software without restriction, including without limitation the rights to
|
||||||
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
* subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.api.definitions;
|
package appeng.api.definitions;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
|
|
||||||
|
|
||||||
public interface IItemDefinition extends IComparableDefinition
|
public interface IItemDefinition extends IComparableDefinition
|
||||||
{
|
{
|
||||||
@@ -18,4 +41,9 @@ public interface IItemDefinition extends IComparableDefinition
|
|||||||
* @return an {@link ItemStack} with specified quantity of this item.
|
* @return an {@link ItemStack} with specified quantity of this item.
|
||||||
*/
|
*/
|
||||||
Optional<ItemStack> maybeStack( int stackSize );
|
Optional<ItemStack> maybeStack( int stackSize );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return <tt>true</tt> if definition is enabled
|
||||||
|
*/
|
||||||
|
boolean isEnabled();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ public interface IParts
|
|||||||
|
|
||||||
IItemDefinition p2PTunnelOpenComputers();
|
IItemDefinition p2PTunnelOpenComputers();
|
||||||
|
|
||||||
|
IItemDefinition p2PTunnelPneumaticCraft();
|
||||||
|
|
||||||
IItemDefinition cableAnchor();
|
IItemDefinition cableAnchor();
|
||||||
|
|
||||||
IItemDefinition monitor();
|
IItemDefinition monitor();
|
||||||
|
|||||||
@@ -1,10 +1,15 @@
|
|||||||
|
|
||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
@@ -12,22 +17,26 @@ import net.minecraft.item.ItemStack;
|
|||||||
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
|
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
|
||||||
*
|
*
|
||||||
* @author thatsIch
|
* @author thatsIch
|
||||||
* @version rv2
|
* @version rv3
|
||||||
* @since rv2
|
* @since rv2
|
||||||
*/
|
*/
|
||||||
public interface IInscriberRegistry
|
public interface IInscriberRegistry
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Current list of registered recipes, you can modify this if you want too.
|
* An immutable copy of currently registered recipes.
|
||||||
* Will never contain a null recipe
|
*
|
||||||
|
* Use the provided methods to actually modify the inscriber recipes.
|
||||||
|
*
|
||||||
|
* @see IInscriberRegistry#addRecipe(IInscriberRecipe)
|
||||||
|
* @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
|
||||||
*
|
*
|
||||||
* @return currentlyRegisteredRecipes
|
* @return currentlyRegisteredRecipes
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
List<IInscriberRecipe> getRecipes();
|
Collection<IInscriberRecipe> getRecipes();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional items which are used in the top or bottom slot
|
* Optional items which are used in the top or bottom slot.
|
||||||
*
|
*
|
||||||
* @return set of all optional items
|
* @return set of all optional items
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +44,7 @@ public interface IInscriberRegistry
|
|||||||
Set<ItemStack> getOptionals();
|
Set<ItemStack> getOptionals();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all registered items which are valid inputs
|
* Get all registered items which are valid inputs.
|
||||||
*
|
*
|
||||||
* @return set of all input items
|
* @return set of all input items
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +52,7 @@ public interface IInscriberRegistry
|
|||||||
Set<ItemStack> getInputs();
|
Set<ItemStack> getInputs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extensible way to create an inscriber recipe
|
* Extensible way to create an inscriber recipe.
|
||||||
*
|
*
|
||||||
* @return builder for inscriber recipes
|
* @return builder for inscriber recipes
|
||||||
*/
|
*/
|
||||||
@@ -61,9 +70,10 @@ public interface IInscriberRegistry
|
|||||||
void addRecipe( IInscriberRecipe recipe );
|
void addRecipe( IInscriberRecipe recipe );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a recipe from the registry
|
* Removes all equal recipes from the registry.
|
||||||
*
|
*
|
||||||
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense
|
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense.
|
||||||
*/
|
*/
|
||||||
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
|
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 AlgorithmX2
|
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -24,10 +24,12 @@
|
|||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
|
* Maintains a save specific list of userids and username combinations this greatly simplifies storage internally and
|
||||||
@@ -55,5 +57,6 @@ public interface IPlayerRegistry
|
|||||||
*
|
*
|
||||||
* @return PlayerEntity, or null if the player could not be found.
|
* @return PlayerEntity, or null if the player could not be found.
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
EntityPlayer findPlayer( int playerID );
|
EntityPlayer findPlayer( int playerID );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 AlgorithmX2
|
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -24,11 +24,19 @@
|
|||||||
package appeng.api.features;
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import appeng.api.recipes.ICraftHandler;
|
import appeng.api.recipes.ICraftHandler;
|
||||||
import appeng.api.recipes.IRecipeHandler;
|
import appeng.api.recipes.IRecipeHandler;
|
||||||
import appeng.api.recipes.ISubItemResolver;
|
import appeng.api.recipes.ISubItemResolver;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AlgorithmX2
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv3 - 10.08.2015
|
||||||
|
* @since rv0
|
||||||
|
*/
|
||||||
public interface IRecipeHandlerRegistry
|
public interface IRecipeHandlerRegistry
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -37,7 +45,7 @@ public interface IRecipeHandlerRegistry
|
|||||||
*
|
*
|
||||||
* MUST BE CALLED IN PRE-INIT
|
* MUST BE CALLED IN PRE-INIT
|
||||||
*
|
*
|
||||||
* @param name name of crafthandler
|
* @param name name of crafthandler
|
||||||
* @param handler class of crafthandler
|
* @param handler class of crafthandler
|
||||||
*/
|
*/
|
||||||
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
||||||
@@ -56,6 +64,7 @@ public interface IRecipeHandlerRegistry
|
|||||||
*
|
*
|
||||||
* @return A recipe handler by name, returns null on failure.
|
* @return A recipe handler by name, returns null on failure.
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
ICraftHandler getCraftHandlerFor( String name );
|
ICraftHandler getCraftHandlerFor( String name );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,9 +76,10 @@ public interface IRecipeHandlerRegistry
|
|||||||
* resolve sub items by name.
|
* resolve sub items by name.
|
||||||
*
|
*
|
||||||
* @param nameSpace namespace of item
|
* @param nameSpace namespace of item
|
||||||
* @param itemName full name of item
|
* @param itemName full name of item
|
||||||
*
|
*
|
||||||
* @return ResolverResult or ResolverResultSet
|
* @return ResolverResult or ResolverResultSet or null if could not resolve
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
Object resolveItem( String nameSpace, String itemName );
|
Object resolveItem( String nameSpace, String itemName );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 AlgorithmX2
|
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -94,7 +94,7 @@ public interface IFacadePart
|
|||||||
|
|
||||||
int getItemDamage();
|
int getItemDamage();
|
||||||
|
|
||||||
boolean isBC();
|
boolean notAEFacade();
|
||||||
|
|
||||||
void setThinFacades( boolean useThinFacades );
|
void setThinFacades( boolean useThinFacades );
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* The MIT License (MIT)
|
* The MIT License (MIT)
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013 AlgorithmX2
|
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
* this software and associated documentation files (the "Software"), to deal in
|
* this software and associated documentation files (the "Software"), to deal in
|
||||||
@@ -24,6 +24,8 @@
|
|||||||
package appeng.api.parts;
|
package appeng.api.parts;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
@@ -63,5 +65,6 @@ public interface IPartItem
|
|||||||
*
|
*
|
||||||
* @return part from item
|
* @return part from item
|
||||||
*/
|
*/
|
||||||
|
@Nullable
|
||||||
IPart createPartFromItemStack( ItemStack is );
|
IPart createPartFromItemStack( ItemStack is );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
|
|
||||||
package appeng.block;
|
package appeng.block;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemSlab;
|
import net.minecraft.item.ItemSlab;
|
||||||
|
|
||||||
public class AEBaseItemBlockSlab extends ItemSlab {
|
|
||||||
|
|
||||||
public AEBaseItemBlockSlab(Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab)
|
public class AEBaseItemBlockSlab extends ItemSlab
|
||||||
|
{
|
||||||
|
|
||||||
|
public AEBaseItemBlockSlab( Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab )
|
||||||
{
|
{
|
||||||
super( block, singleSlab, doubleSlab, isDoubleSlab );
|
super( block, singleSlab, doubleSlab, isDoubleSlab );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,15 +22,14 @@ package appeng.block;
|
|||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockSlab;
|
import net.minecraft.block.BlockSlab;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.features.IAEFeature;
|
import appeng.core.features.IAEFeature;
|
||||||
import appeng.core.features.IFeatureHandler;
|
import appeng.core.features.IFeatureHandler;
|
||||||
@@ -57,24 +56,27 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
|||||||
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
||||||
this.setStepSound( block.stepSound );
|
this.setStepSound( block.stepSound );
|
||||||
this.useNeighborBrightness = true;
|
this.useNeighborBrightness = true;
|
||||||
if (!field_150004_a) this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs(this);
|
if( !this.field_150004_a )
|
||||||
this.features = !field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
{
|
||||||
|
this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs( this );
|
||||||
|
}
|
||||||
|
this.features = !this.field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock setSlabs(AEBaseSlabBlock slabs)
|
public AEBaseSlabBlock setSlabs( AEBaseSlabBlock slabs )
|
||||||
{
|
{
|
||||||
this.slabs = slabs;
|
this.slabs = slabs;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock slabs()
|
public AEBaseSlabBlock slabs()
|
||||||
{
|
{
|
||||||
return slabs;
|
return this.slabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock doubleSlabs()
|
public AEBaseSlabBlock doubleSlabs()
|
||||||
{
|
{
|
||||||
return doubleSlabs;
|
return this.doubleSlabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -90,40 +92,48 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(int dir, int meta)
|
public IIcon getIcon( int dir, int meta )
|
||||||
{
|
{
|
||||||
return block.getIcon( dir, this.meta );
|
return this.block.getIcon( dir, this.meta );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String func_150002_b(int p_150002_1_)
|
public String func_150002_b( int p_150002_1_ )
|
||||||
{
|
{
|
||||||
return this.getUnlocalizedName();
|
return this.getUnlocalizedName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister reg) { }
|
public void registerBlockIcons( IIconRegister reg )
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int meta, Random rand, int fortune)
|
|
||||||
{
|
{
|
||||||
return this.field_150004_a ? Item.getItemFromBlock(this.slabs) : Item.getItemFromBlock(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
public Item getItemDropped( int meta, Random rand, int fortune )
|
||||||
{
|
{
|
||||||
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock(x, y, z);
|
return this.field_150004_a ? Item.getItemFromBlock( this.slabs ) : Item.getItemFromBlock( this );
|
||||||
|
}
|
||||||
|
|
||||||
if (block == null) return null;
|
@Override
|
||||||
if (block.field_150004_a) block = this.slabs;
|
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
|
||||||
|
{
|
||||||
|
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock( x, y, z );
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z) & 7;
|
if( block == null )
|
||||||
return new ItemStack(block, 1, meta);
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
if( block.field_150004_a )
|
||||||
|
{
|
||||||
|
block = this.slabs;
|
||||||
|
}
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata( x, y, z ) & 7;
|
||||||
|
return new ItemStack( block, 1, meta );
|
||||||
}
|
}
|
||||||
|
|
||||||
public String name()
|
public String name()
|
||||||
{
|
{
|
||||||
return name;
|
return this.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ import appeng.api.implementations.items.MemoryCardMessages;
|
|||||||
import appeng.api.implementations.tiles.IColorableTile;
|
import appeng.api.implementations.tiles.IColorableTile;
|
||||||
import appeng.api.util.AEColor;
|
import appeng.api.util.AEColor;
|
||||||
import appeng.api.util.IOrientable;
|
import appeng.api.util.IOrientable;
|
||||||
|
import appeng.block.networking.BlockCableBus;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.features.AETileBlockFeatureHandler;
|
import appeng.core.features.AETileBlockFeatureHandler;
|
||||||
import appeng.core.features.IAEFeature;
|
import appeng.core.features.IAEFeature;
|
||||||
import appeng.core.features.ItemStackSrc;
|
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.tile.networking.TileCableBus;
|
import appeng.tile.networking.TileCableBus;
|
||||||
@@ -88,8 +88,6 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||||||
protected void setTileEntity( Class<? extends TileEntity> c )
|
protected void setTileEntity( Class<? extends TileEntity> c )
|
||||||
{
|
{
|
||||||
this.tileEntityType = c;
|
this.tileEntityType = c;
|
||||||
|
|
||||||
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
|
|
||||||
this.isInventory = IInventory.class.isAssignableFrom( c );
|
this.isInventory = IInventory.class.isAssignableFrom( c );
|
||||||
this.setTileProvider( this.hasBlockTileEntity() );
|
this.setTileProvider( this.hasBlockTileEntity() );
|
||||||
}
|
}
|
||||||
@@ -288,7 +286,7 @@ public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( is.getItem() instanceof IMemoryCard )
|
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
|
||||||
{
|
{
|
||||||
final IMemoryCard memoryCard = (IMemoryCard) is.getItem();
|
final IMemoryCard memoryCard = (IMemoryCard) is.getItem();
|
||||||
if( player.isSneaking() )
|
if( player.isSneaking() )
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
import appeng.api.util.IOrientable;
|
import appeng.api.util.IOrientable;
|
||||||
import appeng.api.util.IOrientableBlock;
|
import appeng.api.util.IOrientableBlock;
|
||||||
import appeng.block.AEBaseTileBlock;
|
import appeng.block.AEBaseTileBlock;
|
||||||
import appeng.client.render.BaseBlockRender;
|
|
||||||
import appeng.client.render.blocks.RenderQuartzTorch;
|
import appeng.client.render.blocks.RenderQuartzTorch;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
@@ -53,7 +52,6 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
|
|||||||
{
|
{
|
||||||
super( Material.circuits );
|
super( Material.circuits );
|
||||||
|
|
||||||
this.setLightLevel( 0.9375F );
|
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = false;
|
this.isFullSize = false;
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
|
|||||||
@@ -25,14 +25,12 @@ import java.util.Random;
|
|||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import appeng.api.util.IOrientable;
|
|
||||||
import appeng.api.util.IOrientableBlock;
|
import appeng.api.util.IOrientableBlock;
|
||||||
import appeng.block.AEBaseTileBlock;
|
import appeng.block.AEBaseTileBlock;
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
@@ -41,7 +39,6 @@ import appeng.client.render.effects.LightningFX;
|
|||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.helpers.MetaRotation;
|
|
||||||
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
import appeng.tile.misc.TileQuartzGrowthAccelerator;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
@@ -144,14 +141,14 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
/**
|
||||||
|
* TODO: remove with 1.8 or later
|
||||||
|
*
|
||||||
|
* @Deprecated no longer true, only kept to prevent missing blocks.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
public boolean usesMetadata()
|
public boolean usesMetadata()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
|
|
||||||
{
|
|
||||||
return new MetaRotation( w, x, y, z );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ import appeng.transformer.annotations.Integration.Method;
|
|||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR" )
|
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = IntegrationType.MFR )
|
||||||
public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -455,7 +455,8 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
|||||||
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
||||||
}
|
}
|
||||||
catch( Throwable ignored )
|
catch( Throwable ignored )
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,7 +506,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Method( iname = "MFR" )
|
@Method( iname = IntegrationType.MFR )
|
||||||
public RedNetConnectionType getConnectionType( World world, int x, int y, int z, ForgeDirection side )
|
public RedNetConnectionType getConnectionType( World world, int x, int y, int z, ForgeDirection side )
|
||||||
{
|
{
|
||||||
return this.cb( world, x, y, z ).canConnectRedstone( EnumSet.allOf( ForgeDirection.class ) ) ? RedNetConnectionType.CableSingle : RedNetConnectionType.None;
|
return this.cb( world, x, y, z ).canConnectRedstone( EnumSet.allOf( ForgeDirection.class ) ) ? RedNetConnectionType.CableSingle : RedNetConnectionType.None;
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ import net.minecraft.block.material.Material;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.block.AEBaseTileBlock;
|
import appeng.block.AEBaseTileBlock;
|
||||||
import appeng.client.render.BaseBlockRender;
|
|
||||||
import appeng.client.render.blocks.RenderQNB;
|
import appeng.client.render.blocks.RenderQNB;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.helpers.ICustomCollision;
|
import appeng.helpers.ICustomCollision;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ package appeng.block.qnb;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@@ -28,7 +27,6 @@ import net.minecraft.entity.Entity;
|
|||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.core.features.AEFeature;
|
|
||||||
import appeng.tile.qnb.TileQuantumBridge;
|
import appeng.tile.qnb.TileQuantumBridge;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -43,8 +43,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
import appeng.api.util.IOrientable;
|
import appeng.api.util.IOrientable;
|
||||||
import appeng.api.util.IOrientableBlock;
|
import appeng.api.util.IOrientableBlock;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.core.WorldSettings;
|
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
|
import appeng.core.worlddata.WorldData;
|
||||||
import appeng.helpers.LocationRotation;
|
import appeng.helpers.LocationRotation;
|
||||||
import appeng.helpers.NullRotation;
|
import appeng.helpers.NullRotation;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -118,7 +118,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
super.onBlockAdded( w, x, y, z );
|
super.onBlockAdded( w, x, y, z );
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
WorldData.instance().compassData().service().updateArea( w, x, y, z );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
super.breakBlock( w, x, y, z, b, metadata );
|
super.breakBlock( w, x, y, z, b, metadata );
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
WorldData.instance().compassData().service().updateArea( w, x, y, z );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -30,7 +30,6 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.exceptions.MissingDefinition;
|
import appeng.api.exceptions.MissingDefinition;
|
||||||
@@ -63,12 +62,6 @@ public class OreQuartz extends AEBaseBlock
|
|||||||
return RenderQuartzOre.class;
|
return RenderQuartzOre.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void postInit()
|
|
||||||
{
|
|
||||||
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( this ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMixedBrightnessForBlock( IBlockAccess par1iBlockAccess, int par2, int par3, int par4 )
|
public int getMixedBrightnessForBlock( IBlockAccess par1iBlockAccess, int par2, int par3, int par4 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
@Override
|
@Override
|
||||||
public int damageDropped( int id )
|
public int damageDropped( int id )
|
||||||
{
|
{
|
||||||
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||||
{
|
{
|
||||||
return crystalStack.getItemDamage();
|
return crystalStack.getItemDamage();
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if ( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
private final static int CANCEL_HEIGHT = 20;
|
private final static int CANCEL_HEIGHT = 20;
|
||||||
private final static int CANCEL_WIDTH = 50;
|
private final static int CANCEL_WIDTH = 50;
|
||||||
|
|
||||||
private final static int ETA_TOP_OFFSET = 165;
|
private final static int TITLE_TOP_OFFSET = 7;
|
||||||
private final static int ETA_LEFT_OFFSET = 8;
|
private final static int TITLE_LEFT_OFFSET = 8;
|
||||||
|
|
||||||
private final static int ITEMSTACK_LEFT_OFFSET = 9;
|
private final static int ITEMSTACK_LEFT_OFFSET = 9;
|
||||||
private final static int ITEMSTACK_TOP_OFFSET = 22;
|
private final static int ITEMSTACK_TOP_OFFSET = 22;
|
||||||
@@ -192,18 +192,18 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
@Override
|
@Override
|
||||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||||
{
|
{
|
||||||
ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
|
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
|
||||||
|
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
|
||||||
|
|
||||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() ), 8, 7, TEXT_COLOR );
|
if( this.craftingCpu.eta > 0 && !this.visual.isEmpty() )
|
||||||
|
|
||||||
if( this.craftingCpu.eta > 0 )
|
|
||||||
{
|
{
|
||||||
final String etaText = this.getGuiDisplayName( GuiText.ETA.getLocal() );
|
|
||||||
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.eta, TimeUnit.NANOSECONDS );
|
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.eta, TimeUnit.NANOSECONDS );
|
||||||
final String etaTimeText = DurationFormatUtils.formatDuration( etaInMilliseconds, this.getGuiDisplayName( GuiText.ETAFormat.getLocal() ) );
|
final String etaTimeText = DurationFormatUtils.formatDuration( etaInMilliseconds, GuiText.ETAFormat.getLocal() );
|
||||||
this.fontRendererObj.drawString( String.format( etaText, etaTimeText ), ETA_LEFT_OFFSET, ETA_TOP_OFFSET, TEXT_COLOR );
|
title += " - " + etaTimeText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.fontRendererObj.drawString( title, TITLE_LEFT_OFFSET, TITLE_TOP_OFFSET, TEXT_COLOR );
|
||||||
|
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ import appeng.client.me.ClientDCInternalInv;
|
|||||||
import appeng.client.me.SlotDisconnected;
|
import appeng.client.me.SlotDisconnected;
|
||||||
import appeng.container.implementations.ContainerInterfaceTerminal;
|
import appeng.container.implementations.ContainerInterfaceTerminal;
|
||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.parts.reporting.PartMonitor;
|
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
private boolean refreshList = false;
|
private boolean refreshList = false;
|
||||||
private MEGuiTextField searchField;
|
private MEGuiTextField searchField;
|
||||||
|
|
||||||
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartMonitor te )
|
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartInterfaceTerminal te )
|
||||||
{
|
{
|
||||||
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
|
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
|
||||||
this.myScrollBar = new GuiScrollbar();
|
this.myScrollBar = new GuiScrollbar();
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ import appeng.core.sync.packets.PacketValueConfig;
|
|||||||
import appeng.helpers.WirelessTerminalGuiObject;
|
import appeng.helpers.WirelessTerminalGuiObject;
|
||||||
import appeng.integration.IntegrationRegistry;
|
import appeng.integration.IntegrationRegistry;
|
||||||
import appeng.integration.IntegrationType;
|
import appeng.integration.IntegrationType;
|
||||||
import appeng.parts.reporting.PartTerminal;
|
import appeng.parts.reporting.AbstractPartTerminal;
|
||||||
import appeng.tile.misc.TileSecurity;
|
import appeng.tile.misc.TileSecurity;
|
||||||
import appeng.util.IConfigManagerHost;
|
import appeng.util.IConfigManagerHost;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
@@ -139,7 +139,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
{
|
{
|
||||||
this.myName = GuiText.Chest;
|
this.myName = GuiText.Chest;
|
||||||
}
|
}
|
||||||
else if( te instanceof PartTerminal )
|
else if( te instanceof AbstractPartTerminal )
|
||||||
{
|
{
|
||||||
this.myName = GuiText.Terminal;
|
this.myName = GuiText.Terminal;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
|||||||
|
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
|
import appeng.api.config.SchedulingMode;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
import appeng.api.config.YesNo;
|
import appeng.api.config.YesNo;
|
||||||
@@ -36,6 +37,7 @@ import appeng.container.implementations.ContainerUpgradeable;
|
|||||||
import appeng.core.localization.GuiText;
|
import appeng.core.localization.GuiText;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
import appeng.core.sync.packets.PacketConfigButton;
|
import appeng.core.sync.packets.PacketConfigButton;
|
||||||
|
import appeng.parts.automation.PartExportBus;
|
||||||
import appeng.parts.automation.PartImportBus;
|
import appeng.parts.automation.PartImportBus;
|
||||||
|
|
||||||
|
|
||||||
@@ -48,6 +50,7 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
GuiImgButton redstoneMode;
|
GuiImgButton redstoneMode;
|
||||||
GuiImgButton fuzzyMode;
|
GuiImgButton fuzzyMode;
|
||||||
GuiImgButton craftMode;
|
GuiImgButton craftMode;
|
||||||
|
GuiImgButton schedulingMode;
|
||||||
|
|
||||||
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
|
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
|
||||||
{
|
{
|
||||||
@@ -81,10 +84,12 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||||
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
||||||
|
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
|
||||||
|
|
||||||
this.buttonList.add( this.craftMode );
|
this.buttonList.add( this.craftMode );
|
||||||
this.buttonList.add( this.redstoneMode );
|
this.buttonList.add( this.redstoneMode );
|
||||||
this.buttonList.add( this.fuzzyMode );
|
this.buttonList.add( this.fuzzyMode );
|
||||||
|
this.buttonList.add( this.schedulingMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,6 +112,11 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
{
|
{
|
||||||
this.craftMode.set( this.cvb.cMode );
|
this.craftMode.set( this.cvb.cMode );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( this.schedulingMode != null )
|
||||||
|
{
|
||||||
|
this.schedulingMode.set( this.cvb.schedulingMode );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -140,6 +150,10 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
{
|
{
|
||||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||||
}
|
}
|
||||||
|
if( this.schedulingMode != null )
|
||||||
|
{
|
||||||
|
this.schedulingMode.setVisibility(this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
@@ -178,5 +192,10 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
{
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( btn == this.schedulingMode )
|
||||||
|
{
|
||||||
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.schedulingMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import appeng.api.config.OperationMode;
|
|||||||
import appeng.api.config.PowerUnits;
|
import appeng.api.config.PowerUnits;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
import appeng.api.config.RelativeDirection;
|
import appeng.api.config.RelativeDirection;
|
||||||
|
import appeng.api.config.SchedulingMode;
|
||||||
import appeng.api.config.SearchBoxMode;
|
import appeng.api.config.SearchBoxMode;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.SortDir;
|
import appeng.api.config.SortDir;
|
||||||
@@ -158,6 +159,10 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
|
|
||||||
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
||||||
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
||||||
|
|
||||||
|
this.registerApp( 16 * 15, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeDefault );
|
||||||
|
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRoundRobin );
|
||||||
|
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRandom );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -389,7 +394,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class ButtonAppearance
|
private static class ButtonAppearance
|
||||||
{
|
{
|
||||||
public int index;
|
public int index;
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
|||||||
/**
|
/**
|
||||||
* Using itemstack as an icon
|
* Using itemstack as an icon
|
||||||
*
|
*
|
||||||
* @param x x pos of button
|
* @param x x pos of button
|
||||||
* @param y y pos of button
|
* @param y y pos of button
|
||||||
* @param ico used icon
|
* @param ico used icon
|
||||||
* @param message mouse over message
|
* @param message mouse over message
|
||||||
* @param ir renderer
|
* @param ir renderer
|
||||||
*/
|
*/
|
||||||
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
|
|||||||
* Pays attention to the '_' caret.
|
* Pays attention to the '_' caret.
|
||||||
*
|
*
|
||||||
* @param fontRenderer renderer for the strings
|
* @param fontRenderer renderer for the strings
|
||||||
* @param xPos absolute left position
|
* @param xPos absolute left position
|
||||||
* @param yPos absolute top position
|
* @param yPos absolute top position
|
||||||
* @param width absolute width
|
* @param width absolute width
|
||||||
* @param height absolute height
|
* @param height absolute height
|
||||||
*/
|
*/
|
||||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package appeng.client.render;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -21,6 +21,7 @@ package appeng.client.render;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
@@ -164,6 +165,7 @@ public class BusRenderer implements IItemRenderer
|
|||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
public IPart getRenderer( ItemStack is, IPartItem c )
|
public IPart getRenderer( ItemStack is, IPartItem c )
|
||||||
{
|
{
|
||||||
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
|
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import net.minecraft.client.renderer.Tessellator;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
import appeng.block.AEBaseBlock;
|
|
||||||
import appeng.block.networking.BlockController;
|
import appeng.block.networking.BlockController;
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.texture.ExtraBlockTextures;
|
import appeng.client.texture.ExtraBlockTextures;
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
|||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
GL11.glDisable( GL11.GL_LIGHTING );
|
GL11.glDisable( GL11.GL_LIGHTING );
|
||||||
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||||
|
GL11.glCullFace( GL11.GL_FRONT );
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
|
mc.renderEngine.bindTexture( TextureMap.locationBlocksTexture );
|
||||||
@@ -224,6 +225,9 @@ public class RenderBlockInscriber extends BaseBlockRender<BlockInscriber, TileIn
|
|||||||
|
|
||||||
tess.draw();
|
tess.draw();
|
||||||
|
|
||||||
|
GL11.glCullFace( GL11.GL_BACK );
|
||||||
|
GL11.glEnable( GL11.GL_LIGHTING );
|
||||||
|
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
|
|
||||||
int items = 0;
|
int items = 0;
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import appeng.block.AEBaseTileBlock;
|
|
||||||
import appeng.block.misc.BlockPaint;
|
import appeng.block.misc.BlockPaint;
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.client.texture.ExtraBlockTextures;
|
import appeng.client.texture.ExtraBlockTextures;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package appeng.client.render.blocks;
|
|||||||
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
@@ -73,7 +74,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
|
|
||||||
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
||||||
@@ -167,7 +168,7 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
|||||||
this.model.renderAll( ( now / 50000.0f ) * (float) Math.PI * 500.0f );
|
this.model.renderAll( ( now / 50000.0f ) * (float) Math.PI * 500.0f );
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,8 +193,9 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glEnable( GL12.GL_RESCALE_NORMAL );
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
|
GL11.glCullFace( GL11.GL_FRONT );
|
||||||
|
|
||||||
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
ResourceLocation loc = new ResourceLocation( "appliedenergistics2", "textures/models/compass.png" );
|
||||||
|
|
||||||
@@ -234,7 +236,8 @@ public class RenderBlockSkyCompass extends BaseBlockRender<BlockSkyCompass, Tile
|
|||||||
this.model.renderAll( ( now / 500000.0f ) * (float) Math.PI * 500.0f );
|
this.model.renderAll( ( now / 500000.0f ) * (float) Math.PI * 500.0f );
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDisable( 32826 /* GL_RESCALE_NORMAL_EXT */);
|
GL11.glCullFace( GL11.GL_BACK );
|
||||||
|
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
import appeng.api.util.IOrientable;
|
import appeng.api.util.IOrientable;
|
||||||
import appeng.api.util.IOrientableBlock;
|
import appeng.api.util.IOrientableBlock;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.block.misc.BlockQuartzTorch;
|
|
||||||
import appeng.client.render.BaseBlockRender;
|
import appeng.client.render.BaseBlockRender;
|
||||||
import appeng.tile.AEBaseTile;
|
import appeng.tile.AEBaseTile;
|
||||||
|
|
||||||
@@ -99,8 +98,6 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
|||||||
@Override
|
@Override
|
||||||
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
public boolean renderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
|
||||||
{
|
{
|
||||||
BlockQuartzTorch blk = (BlockQuartzTorch) block;
|
|
||||||
|
|
||||||
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z );
|
IOrientable te = ( (IOrientableBlock) block ).getOrientable( world, x, y, z );
|
||||||
|
|
||||||
float Point2 = 6.0f / 16.0f;
|
float Point2 = 6.0f / 16.0f;
|
||||||
@@ -149,19 +146,19 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
|||||||
super.renderInWorld( block, world, x, y, z, renderer );
|
super.renderInWorld( block, world, x, y, z, renderer );
|
||||||
}
|
}
|
||||||
|
|
||||||
blk.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 0 ) );
|
block.getRendererInstance().setTemporaryRenderIcon( Blocks.hopper.getIcon( 0, 0 ) );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
|
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point2 + zOff, Point13 + xOff, top + yOff, Point3 + zOff );
|
||||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
boolean out = renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
|
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point12 + zOff, Point13 + xOff, top + yOff, Point13 + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point3 + zOff, Point3 + xOff, top + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point2 + xOff, bottom + yOff, Point3 + zOff, Point3 + xOff, top + yOff, Point12 + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
renderer.setRenderBounds( Point12 + xOff, bottom + yOff, Point3 + zOff, Point13 + xOff, top + yOff, Point12 + zOff );
|
renderer.setRenderBounds( Point12 + xOff, bottom + yOff, Point3 + zOff, Point13 + xOff, top + yOff, Point12 + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
|
|
||||||
if( te != null )
|
if( te != null )
|
||||||
{
|
{
|
||||||
@@ -170,46 +167,46 @@ public class RenderQuartzTorch extends BaseBlockRender<AEBaseBlock, AEBaseTile>
|
|||||||
{
|
{
|
||||||
case EAST:
|
case EAST:
|
||||||
renderer.setRenderBounds( 0, bottom + yOff, bottom + zOff, Point2 + xOff, top + yOff, top + zOff );
|
renderer.setRenderBounds( 0, bottom + yOff, bottom + zOff, Point2 + xOff, top + yOff, top + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
case WEST:
|
case WEST:
|
||||||
renderer.setRenderBounds( Point13 + xOff, bottom + yOff, bottom + zOff, 1.0, top + yOff, top + zOff );
|
renderer.setRenderBounds( Point13 + xOff, bottom + yOff, bottom + zOff, 1.0, top + yOff, top + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
case NORTH:
|
case NORTH:
|
||||||
renderer.setRenderBounds( bottom + xOff, bottom + yOff, Point13 + zOff, top + xOff, top + yOff, 1.0 );
|
renderer.setRenderBounds( bottom + xOff, bottom + yOff, Point13 + zOff, top + xOff, top + yOff, 1.0 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
case SOUTH:
|
case SOUTH:
|
||||||
renderer.setRenderBounds( bottom + xOff, bottom + yOff, 0, top + xOff, top + yOff, Point2 + zOff );
|
renderer.setRenderBounds( bottom + xOff, bottom + yOff, 0, top + xOff, top + yOff, Point2 + zOff );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
case UP:
|
case UP:
|
||||||
renderer.setRenderBounds( Point2, 0, Point2, Point3, bottom + yOff, Point3 );
|
renderer.setRenderBounds( Point2, 0, Point2, Point3, bottom + yOff, Point3 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point2, 0, Point12, Point3, bottom + yOff, Point13 );
|
renderer.setRenderBounds( Point2, 0, Point12, Point3, bottom + yOff, Point13 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point12, 0, Point2, Point13, bottom + yOff, Point3 );
|
renderer.setRenderBounds( Point12, 0, Point2, Point13, bottom + yOff, Point3 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point12, 0, Point12, Point13, bottom + yOff, Point13 );
|
renderer.setRenderBounds( Point12, 0, Point12, Point13, bottom + yOff, Point13 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
case DOWN:
|
case DOWN:
|
||||||
renderer.setRenderBounds( Point2, top + yOff, Point2, Point3, 1.0, Point3 );
|
renderer.setRenderBounds( Point2, top + yOff, Point2, Point3, 1.0, Point3 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point2, top + yOff, Point12, Point3, 1.0, Point13 );
|
renderer.setRenderBounds( Point2, top + yOff, Point12, Point3, 1.0, Point13 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point12, top + yOff, Point2, Point13, 1.0, Point3 );
|
renderer.setRenderBounds( Point12, top + yOff, Point2, Point13, 1.0, Point3 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
renderer.setRenderBounds( Point12, top + yOff, Point12, Point13, 1.0, Point13 );
|
renderer.setRenderBounds( Point12, top + yOff, Point12, Point13, 1.0, Point13 );
|
||||||
renderer.renderStandardBlock( blk, x, y, z );
|
renderer.renderStandardBlock( block, x, y, z );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
renderer.renderAllFaces = false;
|
renderer.renderAllFaces = false;
|
||||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
block.getRendererInstance().setTemporaryRenderIcon( null );
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,13 +47,13 @@ public enum CableBusTextures
|
|||||||
|
|
||||||
PartPatternTerm_Bright( "PartPatternTerm_Bright" ), PartPatternTerm_Colored( "PartPatternTerm_Colored" ), PartPatternTerm_Dark( "PartPatternTerm_Dark" ),
|
PartPatternTerm_Bright( "PartPatternTerm_Bright" ), PartPatternTerm_Colored( "PartPatternTerm_Colored" ), PartPatternTerm_Dark( "PartPatternTerm_Dark" ),
|
||||||
|
|
||||||
PartConversionMonitor_Bright( "PartConversionMonitor_Bright" ), PartConversionMonitor_Colored( "PartConversionMonitor_Colored" ), PartConversionMonitor_Dark( "PartConversionMonitor_Dark" ),
|
PartConversionMonitor_Bright( "PartConversionMonitor_Bright" ), PartConversionMonitor_Colored( "PartConversionMonitor_Colored" ), PartConversionMonitor_Dark( "PartConversionMonitor_Dark" ), PartConversionMonitor_Dark_Locked( "PartConversionMonitor_Dark_Locked" ),
|
||||||
|
|
||||||
PartInterfaceTerm_Bright( "PartInterfaceTerm_Bright" ), PartInterfaceTerm_Colored( "PartInterfaceTerm_Colored" ), PartInterfaceTerm_Dark( "PartInterfaceTerm_Dark" ),
|
PartInterfaceTerm_Bright( "PartInterfaceTerm_Bright" ), PartInterfaceTerm_Colored( "PartInterfaceTerm_Colored" ), PartInterfaceTerm_Dark( "PartInterfaceTerm_Dark" ),
|
||||||
|
|
||||||
PartCraftingTerm_Bright( "PartCraftingTerm_Bright" ), PartCraftingTerm_Colored( "PartCraftingTerm_Colored" ), PartCraftingTerm_Dark( "PartCraftingTerm_Dark" ), //
|
PartCraftingTerm_Bright( "PartCraftingTerm_Bright" ), PartCraftingTerm_Colored( "PartCraftingTerm_Colored" ), PartCraftingTerm_Dark( "PartCraftingTerm_Dark" ), //
|
||||||
|
|
||||||
PartStorageMonitor_Bright( "PartStorageMonitor_Bright" ), PartStorageMonitor_Colored( "PartStorageMonitor_Colored" ), PartStorageMonitor_Dark( "PartStorageMonitor_Dark" ),
|
PartStorageMonitor_Bright( "PartStorageMonitor_Bright" ), PartStorageMonitor_Colored( "PartStorageMonitor_Colored" ), PartStorageMonitor_Dark( "PartStorageMonitor_Dark" ), PartStorageMonitor_Colored_Locked( "PartStorageMonitor_Colored_Locked" ),
|
||||||
|
|
||||||
PartTerminal_Bright( "PartTerminal_Bright" ), PartTerminal_Colored( "PartTerminal_Colored" ), PartTerminal_Dark( "PartTerminal_Dark" ),
|
PartTerminal_Bright( "PartTerminal_Bright" ), PartTerminal_Colored( "PartTerminal_Colored" ), PartTerminal_Dark( "PartTerminal_Dark" ),
|
||||||
|
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ public class ContainerCraftingCPU extends AEBaseContainer implements IMEMonitorH
|
|||||||
{
|
{
|
||||||
this.monitor = null;
|
this.monitor = null;
|
||||||
this.cpuName = "";
|
this.cpuName = "";
|
||||||
|
this.eta = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||||
*/ protected void setupConfig()
|
*/protected void setupConfig()
|
||||||
{
|
{
|
||||||
this.setupUpgrades();
|
this.setupUpgrades();
|
||||||
}
|
}
|
||||||
@@ -127,10 +127,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||||
{
|
{
|
||||||
boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
if( matchA || matchB )
|
if( matchA || matchB )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,19 +50,19 @@ public class ContainerInterface extends ContainerUpgradeable
|
|||||||
|
|
||||||
this.myDuality = te.getInterfaceDuality();
|
this.myDuality = te.getInterfaceDuality();
|
||||||
|
|
||||||
for( int x = 0; x < 9; x++ )
|
for( int x = 0; x < DualityInterface.NUMBER_OF_PATTERN_SLOTS; x++ )
|
||||||
{
|
{
|
||||||
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.invPlayer ) );
|
this.addSlotToContainer( new SlotRestrictedInput( SlotRestrictedInput.PlacableItemType.ENCODED_PATTERN, this.myDuality.getPatterns(), x, 8 + 18 * x, 90 + 7, this.invPlayer ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < 8; x++ )
|
for( int x = 0; x < DualityInterface.NUMBER_OF_CONFIG_SLOTS; x++ )
|
||||||
{
|
{
|
||||||
this.addSlotToContainer( new SlotFake( this.myDuality.getConfig(), x, 17 + 18 * x, 35 ) );
|
this.addSlotToContainer( new SlotFake( this.myDuality.getConfig(), x, 8 + 18 * x, 35 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < 8; x++ )
|
for( int x = 0; x < DualityInterface.NUMBER_OF_STORAGE_SLOTS; x++ )
|
||||||
{
|
{
|
||||||
this.addSlotToContainer( new SlotNormal( this.myDuality.getStorage(), x, 17 + 18 * x, 35 + 18 ) );
|
this.addSlotToContainer( new SlotNormal( this.myDuality.getStorage(), x, 8 + 18 * x, 35 + 18 ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import appeng.helpers.IInterfaceHost;
|
|||||||
import appeng.helpers.InventoryAction;
|
import appeng.helpers.InventoryAction;
|
||||||
import appeng.items.misc.ItemEncodedPattern;
|
import appeng.items.misc.ItemEncodedPattern;
|
||||||
import appeng.parts.misc.PartInterface;
|
import appeng.parts.misc.PartInterface;
|
||||||
import appeng.parts.reporting.PartMonitor;
|
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||||
import appeng.tile.inventory.AppEngInternalInventory;
|
import appeng.tile.inventory.AppEngInternalInventory;
|
||||||
import appeng.tile.misc.TileInterface;
|
import appeng.tile.misc.TileInterface;
|
||||||
import appeng.util.InventoryAdaptor;
|
import appeng.util.InventoryAdaptor;
|
||||||
@@ -67,7 +67,7 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
|||||||
IGrid grid;
|
IGrid grid;
|
||||||
NBTTagCompound data = new NBTTagCompound();
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
|
||||||
public ContainerInterfaceTerminal( InventoryPlayer ip, PartMonitor anchor )
|
public ContainerInterfaceTerminal( InventoryPlayer ip, PartInterfaceTerminal anchor )
|
||||||
{
|
{
|
||||||
super( ip, anchor );
|
super( ip, anchor );
|
||||||
|
|
||||||
@@ -419,7 +419,6 @@ public final class ContainerInterfaceTerminal extends AEBaseContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class PatternInvSlot extends WrapperInvSlot
|
static class PatternInvSlot extends WrapperInvSlot
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
import appeng.api.config.FuzzyMode;
|
import appeng.api.config.FuzzyMode;
|
||||||
import appeng.api.config.RedstoneMode;
|
import appeng.api.config.RedstoneMode;
|
||||||
|
import appeng.api.config.SchedulingMode;
|
||||||
import appeng.api.config.SecurityPermissions;
|
import appeng.api.config.SecurityPermissions;
|
||||||
import appeng.api.config.Settings;
|
import appeng.api.config.Settings;
|
||||||
import appeng.api.config.Upgrades;
|
import appeng.api.config.Upgrades;
|
||||||
@@ -58,6 +59,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||||||
public FuzzyMode fzMode = FuzzyMode.IGNORE_ALL;
|
public FuzzyMode fzMode = FuzzyMode.IGNORE_ALL;
|
||||||
@GuiSync( 5 )
|
@GuiSync( 5 )
|
||||||
public YesNo cMode = YesNo.NO;
|
public YesNo cMode = YesNo.NO;
|
||||||
|
@GuiSync( 6 )
|
||||||
|
public SchedulingMode schedulingMode = SchedulingMode.DEFAULT;
|
||||||
int tbSlot;
|
int tbSlot;
|
||||||
NetworkToolViewer tbInventory;
|
NetworkToolViewer tbInventory;
|
||||||
|
|
||||||
@@ -217,6 +220,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
|||||||
if( this.upgradeable instanceof PartExportBus )
|
if( this.upgradeable instanceof PartExportBus )
|
||||||
{
|
{
|
||||||
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
||||||
|
this.schedulingMode = (SchedulingMode) cm.getSetting( Settings.SCHEDULING_MODE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ package appeng.container.slot;
|
|||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
|
||||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
|
||||||
|
|
||||||
|
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||||
|
|
||||||
public class SlotPlayerInv extends AppEngSlot
|
public class SlotPlayerInv extends AppEngSlot
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -145,7 +145,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||||
|
// ((ICraftingPatternItem)
|
||||||
// i.getItem()).getPatternForItem( i ) : null;
|
// i.getItem()).getPatternForItem( i ) : null;
|
||||||
return false;// pattern != null;
|
return false;// pattern != null;
|
||||||
}
|
}
|
||||||
@@ -179,8 +180,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
|
|
||||||
case INSCRIBER_INPUT:
|
case INSCRIBER_INPUT:
|
||||||
return true;/*
|
return true;/*
|
||||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return true;
|
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return
|
||||||
*
|
* true;
|
||||||
* return false;
|
* return false;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public final class Api implements IAppEngApi
|
|||||||
@Override
|
@Override
|
||||||
public IGridNode createGridNode( IGridBlock blk )
|
public IGridNode createGridNode( IGridBlock blk )
|
||||||
{
|
{
|
||||||
if ( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ package appeng.core;
|
|||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.google.common.base.Stopwatch;
|
import com.google.common.base.Stopwatch;
|
||||||
@@ -44,6 +45,7 @@ import appeng.core.crash.ModCrashEnhancement;
|
|||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.sync.GuiBridge;
|
import appeng.core.sync.GuiBridge;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
import appeng.core.worlddata.WorldData;
|
||||||
import appeng.hooks.TickHandler;
|
import appeng.hooks.TickHandler;
|
||||||
import appeng.integration.IntegrationRegistry;
|
import appeng.integration.IntegrationRegistry;
|
||||||
import appeng.server.AECommand;
|
import appeng.server.AECommand;
|
||||||
@@ -187,16 +189,16 @@ public final class AppEng
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void serverStopping( FMLServerStoppingEvent event )
|
private void serverAboutToStart( FMLServerAboutToStartEvent evt )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().shutdown();
|
WorldData.onServerAboutToStart();
|
||||||
TickHandler.INSTANCE.shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
private void serverAboutToStart( FMLServerAboutToStartEvent evt )
|
private void serverStopping( FMLServerStoppingEvent event )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().init();
|
WorldData.instance().onServerStopping();
|
||||||
|
TickHandler.INSTANCE.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ package appeng.core;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
@@ -35,6 +36,10 @@ import appeng.core.api.imc.IMCSpatial;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the delegation of the corresponding IMC messages to the suitable IMC processors
|
* Handles the delegation of the corresponding IMC messages to the suitable IMC processors
|
||||||
|
*
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv3 - 10.08.2015
|
||||||
|
* @since rv1
|
||||||
*/
|
*/
|
||||||
public class IMCHandler
|
public class IMCHandler
|
||||||
{
|
{
|
||||||
@@ -43,8 +48,7 @@ public class IMCHandler
|
|||||||
/**
|
/**
|
||||||
* Contains the processors,
|
* Contains the processors,
|
||||||
*
|
*
|
||||||
* is mutable,
|
* is mutable, but write access only by the constructor
|
||||||
* but write access only by the constructor
|
|
||||||
*/
|
*/
|
||||||
private final Map<String, IIMCProcessor> processors;
|
private final Map<String, IIMCProcessor> processors;
|
||||||
|
|
||||||
@@ -62,13 +66,12 @@ public class IMCHandler
|
|||||||
|
|
||||||
for( TunnelType type : TunnelType.values() )
|
for( TunnelType type : TunnelType.values() )
|
||||||
{
|
{
|
||||||
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase(), new IMCP2PAttunement() );
|
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase( Locale.ENGLISH ), new IMCP2PAttunement() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to find every message matching the internal IMC keys.
|
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the attached message.
|
||||||
* When found the corresponding handler will process the attached message.
|
|
||||||
*
|
*
|
||||||
* @param event Event carrying the identifier and message for the handlers
|
* @param event Event carrying the identifier and message for the handlers
|
||||||
*/
|
*/
|
||||||
@@ -80,7 +83,7 @@ public class IMCHandler
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IIMCProcessor handler = this.processors.get( key );
|
final IIMCProcessor handler = this.processors.get( key );
|
||||||
if( handler != null )
|
if( handler != null )
|
||||||
{
|
{
|
||||||
handler.process( message );
|
handler.process( message );
|
||||||
@@ -90,7 +93,7 @@ public class IMCHandler
|
|||||||
throw new IllegalStateException( "Invalid IMC Called: " + key );
|
throw new IllegalStateException( "Invalid IMC Called: " + key );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable t )
|
catch( Exception t )
|
||||||
{
|
{
|
||||||
AELog.warning( "Problem detected when processing IMC " + key + " from " + message.getSender() );
|
AELog.warning( "Problem detected when processing IMC " + key + " from " + message.getSender() );
|
||||||
AELog.error( t );
|
AELog.error( t );
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ package appeng.core;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
@@ -68,7 +69,7 @@ public class RecipeLoader implements Runnable
|
|||||||
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
|
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
|
||||||
final File readmeUserDest = new File( userRecipesDir, "README.html" );
|
final File readmeUserDest = new File( userRecipesDir, "README.html" );
|
||||||
|
|
||||||
// generates generated and user recipes dir
|
// generates generated and user recipes dir
|
||||||
// will clean the generated every time to keep it up to date
|
// will clean the generated every time to keep it up to date
|
||||||
// copies over the recipes in the jar over to the generated folder
|
// copies over the recipes in the jar over to the generated folder
|
||||||
// copies over the readmes
|
// copies over the readmes
|
||||||
|
|||||||
@@ -343,10 +343,10 @@ public final class Registration
|
|||||||
target.partCableCovered = source.cableCovered();
|
target.partCableCovered = source.cableCovered();
|
||||||
target.partCableGlass = source.cableGlass();
|
target.partCableGlass = source.cableGlass();
|
||||||
target.partCableDense = source.cableDense();
|
target.partCableDense = source.cableDense();
|
||||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||||
// target.partLumenCableDense = source.lumenCableDense();
|
// target.partLumenCableDense = source.lumenCableDense();
|
||||||
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
||||||
target.partToggleBus = this.converter.of( source.toggleBus() );
|
target.partToggleBus = this.converter.of( source.toggleBus() );
|
||||||
target.partInvertedToggleBus = this.converter.of( source.invertedToggleBus() );
|
target.partInvertedToggleBus = this.converter.of( source.invertedToggleBus() );
|
||||||
@@ -521,22 +521,6 @@ public final class Registration
|
|||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
|
||||||
|
|
||||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.IC2 ) )
|
|
||||||
{
|
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySink", "ic2.api.energy.tile.IEnergySink" );
|
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergySource", "ic2.api.energy.tile.IEnergySource" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.RF ) )
|
|
||||||
{
|
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyReceiver" );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
|
||||||
{
|
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerSidedEnvironment", "li.cil.oc.api.network.SidedEnvironment" );
|
|
||||||
}
|
|
||||||
|
|
||||||
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
FMLCommonHandler.instance().bus().register( TickHandler.INSTANCE );
|
||||||
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
MinecraftForge.EVENT_BUS.register( TickHandler.INSTANCE );
|
||||||
|
|
||||||
|
|||||||
@@ -1,490 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of Applied Energistics 2.
|
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Applied Energistics 2 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 Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public License
|
|
||||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package appeng.core;
|
|
||||||
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.WeakHashMap;
|
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
import com.mojang.authlib.GameProfile;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.nbt.CompressedStreamTools;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.network.NetworkManager;
|
|
||||||
import net.minecraftforge.common.DimensionManager;
|
|
||||||
import net.minecraftforge.common.config.ConfigCategory;
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
|
||||||
import net.minecraftforge.common.config.Property;
|
|
||||||
|
|
||||||
import appeng.api.util.WorldCoord;
|
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
|
||||||
import appeng.core.sync.packets.PacketNewStorageDimension;
|
|
||||||
import appeng.hooks.TickHandler;
|
|
||||||
import appeng.hooks.TickHandler.PlayerColor;
|
|
||||||
import appeng.me.GridStorage;
|
|
||||||
import appeng.me.GridStorageSearch;
|
|
||||||
import appeng.services.CompassService;
|
|
||||||
|
|
||||||
|
|
||||||
public class WorldSettings extends Configuration
|
|
||||||
{
|
|
||||||
private static final String SPAWNDATA_FOLDER = "spawndata";
|
|
||||||
private static final String COMPASS_FOLDER = "compass";
|
|
||||||
|
|
||||||
private static WorldSettings instance;
|
|
||||||
private final List<Integer> storageCellDims = new ArrayList<Integer>();
|
|
||||||
private final File spawnDataFolder;
|
|
||||||
private final CompassService compass;
|
|
||||||
private final PlayerMappings mappings;
|
|
||||||
private final Map<GridStorageSearch, WeakReference<GridStorageSearch>> loadedStorage = new WeakHashMap<GridStorageSearch, WeakReference<GridStorageSearch>>();
|
|
||||||
private long lastGridStorage;
|
|
||||||
private int lastPlayer;
|
|
||||||
|
|
||||||
public WorldSettings( File aeFolder )
|
|
||||||
{
|
|
||||||
super( new File( aeFolder.getPath(), "settings.cfg" ) );
|
|
||||||
this.spawnDataFolder = new File( aeFolder, SPAWNDATA_FOLDER );
|
|
||||||
this.compass = new CompassService( aeFolder );
|
|
||||||
|
|
||||||
for( int dimID : this.get( "DimensionManager", "StorageCells", new int[0] ).getIntList() )
|
|
||||||
{
|
|
||||||
this.storageCellDims.add( dimID );
|
|
||||||
DimensionManager.registerDimension( dimID, AEConfig.instance.storageProviderID );
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.lastGridStorage = Long.parseLong( this.get( "Counters", "lastGridStorage", 0 ).getString() );
|
|
||||||
this.lastPlayer = this.get( "Counters", "lastPlayer", 0 ).getInt();
|
|
||||||
}
|
|
||||||
catch( NumberFormatException err )
|
|
||||||
{
|
|
||||||
this.lastGridStorage = 0;
|
|
||||||
this.lastPlayer = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
final ConfigCategory playerList = this.getCategory( "players" );
|
|
||||||
this.mappings = new PlayerMappings( playerList, AELog.INSTANCE );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static WorldSettings getInstance()
|
|
||||||
{
|
|
||||||
if( instance == null )
|
|
||||||
{
|
|
||||||
File world = DimensionManager.getCurrentSaveRootDirectory();
|
|
||||||
|
|
||||||
File aeBaseFolder = new File( world.getPath(), "AE2" );
|
|
||||||
|
|
||||||
if( !aeBaseFolder.isDirectory() && !aeBaseFolder.mkdir() )
|
|
||||||
{
|
|
||||||
throw new IllegalStateException( "Failed to create " + aeBaseFolder.getAbsolutePath() );
|
|
||||||
}
|
|
||||||
|
|
||||||
File compass = new File( aeBaseFolder, COMPASS_FOLDER );
|
|
||||||
if( !compass.isDirectory() && !compass.mkdir() )
|
|
||||||
{
|
|
||||||
throw new IllegalStateException( "Failed to create " + compass.getAbsolutePath() );
|
|
||||||
}
|
|
||||||
|
|
||||||
File spawnData = new File( aeBaseFolder, SPAWNDATA_FOLDER );
|
|
||||||
if( !spawnData.isDirectory() && !spawnData.mkdir() )
|
|
||||||
{
|
|
||||||
throw new IllegalStateException( "Failed to create " + spawnData.getAbsolutePath() );
|
|
||||||
}
|
|
||||||
|
|
||||||
instance = new WorldSettings( aeBaseFolder );
|
|
||||||
}
|
|
||||||
|
|
||||||
return instance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Collection<NBTTagCompound> getNearByMeteorites( int dim, int chunkX, int chunkZ )
|
|
||||||
{
|
|
||||||
Collection<NBTTagCompound> ll = new LinkedList<NBTTagCompound>();
|
|
||||||
|
|
||||||
synchronized( WorldSettings.class )
|
|
||||||
{
|
|
||||||
for( int x = -1; x <= 1; x++ )
|
|
||||||
{
|
|
||||||
for( int z = -1; z <= 1; z++ )
|
|
||||||
{
|
|
||||||
int cx = x + ( chunkX >> 4 );
|
|
||||||
int cz = z + ( chunkZ >> 4 );
|
|
||||||
|
|
||||||
NBTTagCompound data = this.loadSpawnData( dim, cx << 4, cz << 4 );
|
|
||||||
|
|
||||||
if( data != null )
|
|
||||||
{
|
|
||||||
// edit.
|
|
||||||
int size = data.getInteger( "num" );
|
|
||||||
for( int s = 0; s < size; s++ )
|
|
||||||
{
|
|
||||||
ll.add( data.getCompoundTag( String.valueOf( s ) ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ll;
|
|
||||||
}
|
|
||||||
|
|
||||||
NBTTagCompound loadSpawnData( int dim, int chunkX, int chunkZ )
|
|
||||||
{
|
|
||||||
if( !Thread.holdsLock( WorldSettings.class ) )
|
|
||||||
{
|
|
||||||
throw new IllegalStateException( "Invalid Request" );
|
|
||||||
}
|
|
||||||
|
|
||||||
NBTTagCompound data = null;
|
|
||||||
File file = new File( this.spawnDataFolder, dim + '_' + ( chunkX >> 4 ) + '_' + ( chunkZ >> 4 ) + ".dat" );
|
|
||||||
|
|
||||||
if( file.isFile() )
|
|
||||||
{
|
|
||||||
FileInputStream fileInputStream = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fileInputStream = new FileInputStream( file );
|
|
||||||
data = CompressedStreamTools.readCompressed( fileInputStream );
|
|
||||||
}
|
|
||||||
catch( Throwable e )
|
|
||||||
{
|
|
||||||
data = new NBTTagCompound();
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if( fileInputStream != null )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fileInputStream.close();
|
|
||||||
}
|
|
||||||
catch( IOException e )
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
data = new NBTTagCompound();
|
|
||||||
}
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean hasGenerated( int dim, int chunkX, int chunkZ )
|
|
||||||
{
|
|
||||||
synchronized( WorldSettings.class )
|
|
||||||
{
|
|
||||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
|
||||||
return data.getBoolean( chunkX + "," + chunkZ );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGenerated( int dim, int chunkX, int chunkZ )
|
|
||||||
{
|
|
||||||
synchronized( WorldSettings.class )
|
|
||||||
{
|
|
||||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
|
||||||
|
|
||||||
// edit.
|
|
||||||
data.setBoolean( chunkX + "," + chunkZ, true );
|
|
||||||
|
|
||||||
this.writeSpawnData( dim, chunkX, chunkZ, data );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void writeSpawnData( int dim, int chunkX, int chunkZ, NBTTagCompound data )
|
|
||||||
{
|
|
||||||
if( !Thread.holdsLock( WorldSettings.class ) )
|
|
||||||
{
|
|
||||||
throw new IllegalStateException( "Invalid Request" );
|
|
||||||
}
|
|
||||||
|
|
||||||
File file = new File( this.spawnDataFolder, dim + '_' + ( chunkX >> 4 ) + '_' + ( chunkZ >> 4 ) + ".dat" );
|
|
||||||
FileOutputStream fileOutputStream = null;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fileOutputStream = new FileOutputStream( file );
|
|
||||||
CompressedStreamTools.writeCompressed( data, fileOutputStream );
|
|
||||||
}
|
|
||||||
catch( Throwable e )
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
if( fileOutputStream != null )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
fileOutputStream.close();
|
|
||||||
}
|
|
||||||
catch( IOException e )
|
|
||||||
{
|
|
||||||
AELog.error( e );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean addNearByMeteorites( int dim, int chunkX, int chunkZ, NBTTagCompound newData )
|
|
||||||
{
|
|
||||||
synchronized( WorldSettings.class )
|
|
||||||
{
|
|
||||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
|
||||||
|
|
||||||
// edit.
|
|
||||||
int size = data.getInteger( "num" );
|
|
||||||
data.setTag( String.valueOf( size ), newData );
|
|
||||||
data.setInteger( "num", size + 1 );
|
|
||||||
|
|
||||||
this.writeSpawnData( dim, chunkX, chunkZ, data );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void shutdown()
|
|
||||||
{
|
|
||||||
this.save();
|
|
||||||
|
|
||||||
for( Integer dimID : this.storageCellDims )
|
|
||||||
{
|
|
||||||
DimensionManager.unregisterDimension( dimID );
|
|
||||||
}
|
|
||||||
|
|
||||||
this.storageCellDims.clear();
|
|
||||||
|
|
||||||
this.compass.kill();
|
|
||||||
instance = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void save()
|
|
||||||
{
|
|
||||||
// populate new data
|
|
||||||
for( GridStorageSearch gs : this.loadedStorage.keySet() )
|
|
||||||
{
|
|
||||||
GridStorage thisStorage = gs.gridStorage.get();
|
|
||||||
if( thisStorage != null && thisStorage.getGrid() != null && !thisStorage.getGrid().isEmpty() )
|
|
||||||
{
|
|
||||||
String value = thisStorage.getValue();
|
|
||||||
this.get( "gridstorage", String.valueOf( thisStorage.getID() ), value ).set( value );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// save to files
|
|
||||||
if( this.hasChanged() )
|
|
||||||
{
|
|
||||||
super.save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addStorageCellDim( int newDim )
|
|
||||||
{
|
|
||||||
this.storageCellDims.add( newDim );
|
|
||||||
DimensionManager.registerDimension( newDim, AEConfig.instance.storageProviderID );
|
|
||||||
|
|
||||||
NetworkHandler.instance.sendToAll( new PacketNewStorageDimension( newDim ) );
|
|
||||||
|
|
||||||
String[] values = new String[this.storageCellDims.size()];
|
|
||||||
|
|
||||||
for( int x = 0; x < values.length; x++ )
|
|
||||||
{
|
|
||||||
values[x] = String.valueOf( this.storageCellDims.get( x ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
this.get( "DimensionManager", "StorageCells", new int[0] ).set( values );
|
|
||||||
this.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
public CompassService getCompass()
|
|
||||||
{
|
|
||||||
return this.compass;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendToPlayer( NetworkManager manager )
|
|
||||||
{
|
|
||||||
if( manager != null )
|
|
||||||
{
|
|
||||||
for( int newDim : this.get( "DimensionManager", "StorageCells", new int[0] ).getIntList() )
|
|
||||||
{
|
|
||||||
manager.scheduleOutboundPacket( ( new PacketNewStorageDimension( newDim ) ).getProxy() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
for( PlayerColor pc : TickHandler.INSTANCE.getPlayerColors().values() )
|
|
||||||
{
|
|
||||||
NetworkHandler.instance.sendToAll( pc.getPacket() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void init()
|
|
||||||
{
|
|
||||||
this.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
public WorldCoord getStoredSize( int dim )
|
|
||||||
{
|
|
||||||
int x = this.get( "StorageCell" + dim, "scaleX", 0 ).getInt();
|
|
||||||
int y = this.get( "StorageCell" + dim, "scaleY", 0 ).getInt();
|
|
||||||
int z = this.get( "StorageCell" + dim, "scaleZ", 0 ).getInt();
|
|
||||||
return new WorldCoord( x, y, z );
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStoredSize( int dim, int targetX, int targetY, int targetZ )
|
|
||||||
{
|
|
||||||
this.get( "StorageCell" + dim, "scaleX", 0 ).set( targetX );
|
|
||||||
this.get( "StorageCell" + dim, "scaleY", 0 ).set( targetY );
|
|
||||||
this.get( "StorageCell" + dim, "scaleZ", 0 ).set( targetZ );
|
|
||||||
this.save();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* lazy loading, can load any id, even ones that don't exist anymore.
|
|
||||||
*
|
|
||||||
* @param storageID ID of grid storage
|
|
||||||
*
|
|
||||||
* @return corresponding grid storage
|
|
||||||
*/
|
|
||||||
public GridStorage getGridStorage( long storageID )
|
|
||||||
{
|
|
||||||
GridStorageSearch gss = new GridStorageSearch( storageID );
|
|
||||||
WeakReference<GridStorageSearch> result = this.loadedStorage.get( gss );
|
|
||||||
|
|
||||||
if( result == null || result.get() == null )
|
|
||||||
{
|
|
||||||
String id = String.valueOf( storageID );
|
|
||||||
String Data = this.get( "gridstorage", id, "" ).getString();
|
|
||||||
GridStorage thisStorage = new GridStorage( Data, storageID, gss );
|
|
||||||
gss.gridStorage = new WeakReference<GridStorage>( thisStorage );
|
|
||||||
this.loadedStorage.put( gss, new WeakReference<GridStorageSearch>( gss ) );
|
|
||||||
return thisStorage;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result.get().gridStorage.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* create a new storage
|
|
||||||
*/
|
|
||||||
public GridStorage getNewGridStorage()
|
|
||||||
{
|
|
||||||
long storageID = this.nextGridStorage();
|
|
||||||
GridStorageSearch gss = new GridStorageSearch( storageID );
|
|
||||||
GridStorage newStorage = new GridStorage( storageID, gss );
|
|
||||||
gss.gridStorage = new WeakReference<GridStorage>( newStorage );
|
|
||||||
this.loadedStorage.put( gss, new WeakReference<GridStorageSearch>( gss ) );
|
|
||||||
return newStorage;
|
|
||||||
}
|
|
||||||
|
|
||||||
private long nextGridStorage()
|
|
||||||
{
|
|
||||||
long r = this.lastGridStorage;
|
|
||||||
this.lastGridStorage++;
|
|
||||||
this.get( "Counters", "lastGridStorage", this.lastGridStorage ).set( Long.toString( this.lastGridStorage ) );
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void destroyGridStorage( long id )
|
|
||||||
{
|
|
||||||
String stringID = String.valueOf( id );
|
|
||||||
this.getCategory( "gridstorage" ).remove( stringID );
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getNextOrderedValue( String name )
|
|
||||||
{
|
|
||||||
Property p = this.get( "orderedValues", name, 0 );
|
|
||||||
int myValue = p.getInt();
|
|
||||||
p.set( myValue + 1 );
|
|
||||||
return myValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getPlayerID( GameProfile profile )
|
|
||||||
{
|
|
||||||
ConfigCategory playerList = this.getCategory( "players" );
|
|
||||||
|
|
||||||
if( playerList == null || profile == null || !profile.isComplete() )
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
String uuid = profile.getId().toString();
|
|
||||||
|
|
||||||
Property prop = playerList.get( uuid );
|
|
||||||
if( prop != null && prop.isIntValue() )
|
|
||||||
{
|
|
||||||
return prop.getInt();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
playerList.put( uuid, prop = new Property( uuid, String.valueOf( this.nextPlayer() ), Property.Type.INTEGER ) );
|
|
||||||
this.mappings.put( prop.getInt(), profile.getId() ); // add to reverse map
|
|
||||||
this.save();
|
|
||||||
return prop.getInt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private long nextPlayer()
|
|
||||||
{
|
|
||||||
long r = this.lastPlayer;
|
|
||||||
this.lastPlayer++;
|
|
||||||
this.get( "Counters", "lastPlayer", this.lastPlayer ).set( this.lastPlayer );
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
public EntityPlayer getPlayerFromID( int playerID )
|
|
||||||
{
|
|
||||||
Optional<UUID> maybe = this.mappings.get( playerID );
|
|
||||||
|
|
||||||
if( maybe.isPresent() )
|
|
||||||
{
|
|
||||||
final UUID uuid = maybe.get();
|
|
||||||
for( EntityPlayer player : CommonHelper.proxy.getPlayers() )
|
|
||||||
{
|
|
||||||
if( player.getUniqueID().equals( uuid ) )
|
|
||||||
{
|
|
||||||
return player;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -241,14 +241,15 @@ public final class ApiBlocks implements IBlocks
|
|||||||
|
|
||||||
this.quartzPillarStair = constructor.registerBlockDefinition( new QuartzPillarStairBlock( quartzPillar ) );
|
this.quartzPillarStair = constructor.registerBlockDefinition( new QuartzPillarStairBlock( quartzPillar ) );
|
||||||
|
|
||||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSlabBlock" ) );
|
||||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBlockSlabBlock" ) );
|
||||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBrickSlabBlock" ) );
|
||||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "FluixSlabBlock" ) );
|
||||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzSlabBlock" ) );
|
||||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "ChiseledQuartzSlabBlock" ) );
|
||||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) );
|
;
|
||||||
|
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzPillarSlabBlock" ) );
|
||||||
|
|
||||||
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public final class ApiParts implements IParts
|
|||||||
private final IItemDefinition p2PTunnelRF;
|
private final IItemDefinition p2PTunnelRF;
|
||||||
private final IItemDefinition p2PTunnelLight;
|
private final IItemDefinition p2PTunnelLight;
|
||||||
private final IItemDefinition p2PTunnelOpenComputers;
|
private final IItemDefinition p2PTunnelOpenComputers;
|
||||||
|
private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||||
private final IItemDefinition cableAnchor;
|
private final IItemDefinition cableAnchor;
|
||||||
private final IItemDefinition monitor;
|
private final IItemDefinition monitor;
|
||||||
private final IItemDefinition semiDarkMonitor;
|
private final IItemDefinition semiDarkMonitor;
|
||||||
@@ -104,6 +105,7 @@ public final class ApiParts implements IParts
|
|||||||
this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||||
this.p2PTunnelLight = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
this.p2PTunnelLight = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||||
this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
||||||
|
this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
|
||||||
this.cableAnchor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CableAnchor ) );
|
this.cableAnchor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||||
this.monitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Monitor ) );
|
this.monitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Monitor ) );
|
||||||
this.semiDarkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
this.semiDarkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||||
@@ -282,6 +284,12 @@ public final class ApiParts implements IParts
|
|||||||
return this.p2PTunnelOpenComputers;
|
return this.p2PTunnelOpenComputers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IItemDefinition p2PTunnelPneumaticCraft()
|
||||||
|
{
|
||||||
|
return this.p2PTunnelPneumaticCraft;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IItemDefinition cableAnchor()
|
public IItemDefinition cableAnchor()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 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 Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.core.api.definitions;
|
package appeng.core.api.definitions;
|
||||||
|
|
||||||
|
|
||||||
@@ -10,6 +28,7 @@ import appeng.api.util.AEColor;
|
|||||||
import appeng.api.util.AEColoredItemDefinition;
|
import appeng.api.util.AEColoredItemDefinition;
|
||||||
import appeng.core.FeatureHandlerRegistry;
|
import appeng.core.FeatureHandlerRegistry;
|
||||||
import appeng.core.FeatureRegistry;
|
import appeng.core.FeatureRegistry;
|
||||||
|
import appeng.core.features.ActivityState;
|
||||||
import appeng.core.features.ColoredItemDefinition;
|
import appeng.core.features.ColoredItemDefinition;
|
||||||
import appeng.core.features.IAEFeature;
|
import appeng.core.features.IAEFeature;
|
||||||
import appeng.core.features.IFeatureHandler;
|
import appeng.core.features.IFeatureHandler;
|
||||||
@@ -35,7 +54,7 @@ public class DefinitionConstructor
|
|||||||
|
|
||||||
if( definition instanceof ITileDefinition )
|
if( definition instanceof ITileDefinition )
|
||||||
{
|
{
|
||||||
return ( (ITileDefinition) definition );
|
return( (ITileDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No tile definition for " + feature );
|
throw new IllegalStateException( "No tile definition for " + feature );
|
||||||
@@ -47,7 +66,7 @@ public class DefinitionConstructor
|
|||||||
|
|
||||||
if( definition instanceof IBlockDefinition )
|
if( definition instanceof IBlockDefinition )
|
||||||
{
|
{
|
||||||
return ( (IBlockDefinition) definition );
|
return( (IBlockDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No block definition for " + feature );
|
throw new IllegalStateException( "No block definition for " + feature );
|
||||||
@@ -76,7 +95,9 @@ public class DefinitionConstructor
|
|||||||
{
|
{
|
||||||
for( AEColor color : AEColor.VALID_COLORS )
|
for( AEColor color : AEColor.VALID_COLORS )
|
||||||
{
|
{
|
||||||
definition.add( color, new ItemStackSrc( targetItem, offset + color.ordinal() ) );
|
final ActivityState state = ActivityState.from( target.isEnabled() );
|
||||||
|
|
||||||
|
definition.add( color, new ItemStackSrc( targetItem, offset + color.ordinal(), state ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,35 +18,35 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
-- or --
|
-- or --
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
NBTTagCompound optional = new NBTTagCompound();
|
NBTTagCompound optional = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setTag( "optional", optional );
|
msg.setTag( "optional", optional );
|
||||||
msg.setFloat( "chance", 0.5 );
|
msg.setFloat( "chance", 0.5 );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound item = new NBTTagCompound();
|
NBTTagCompound item = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||||
msg.setTag( "item", item );
|
msg.setTag( "item", item );
|
||||||
msg.setDouble( "weight", 32.0 );
|
msg.setDouble( "weight", 32.0 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -31,6 +31,7 @@ package appeng.core.api.imc;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ public class IMCP2PAttunement implements IIMCProcessor
|
|||||||
@Override
|
@Override
|
||||||
public void process( IMCMessage m )
|
public void process( IMCMessage m )
|
||||||
{
|
{
|
||||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase();
|
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase( Locale.ENGLISH );
|
||||||
|
|
||||||
TunnelType type = TunnelType.valueOf( key );
|
TunnelType type = TunnelType.valueOf( key );
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.crash;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.crash;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
|||||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||||
{
|
{
|
||||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||||||
|
|
||||||
import appeng.api.definitions.IBlockDefinition;
|
import appeng.api.definitions.IBlockDefinition;
|
||||||
import appeng.block.AEBaseBlock;
|
import appeng.block.AEBaseBlock;
|
||||||
import appeng.core.CommonHelper;
|
|
||||||
import appeng.core.CreativeTab;
|
import appeng.core.CreativeTab;
|
||||||
import appeng.util.Platform;
|
|
||||||
|
|
||||||
|
|
||||||
public final class AEBlockFeatureHandler implements IFeatureHandler
|
public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public enum AEFeature
|
|||||||
|
|
||||||
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
|
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
|
||||||
|
|
||||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ),
|
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ), P2PTunnelPressure( "P2PTunnels" ),
|
||||||
|
|
||||||
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
|
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ public enum AEFeature
|
|||||||
|
|
||||||
AEFeature( String cat )
|
AEFeature( String cat )
|
||||||
{
|
{
|
||||||
this(cat, true);
|
this( cat, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
AEFeature( String cat, boolean defaultValue )
|
AEFeature( String cat, boolean defaultValue )
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import appeng.api.definitions.ITileDefinition;
|
|||||||
import appeng.block.AEBaseTileBlock;
|
import appeng.block.AEBaseTileBlock;
|
||||||
import appeng.core.CommonHelper;
|
import appeng.core.CommonHelper;
|
||||||
import appeng.core.CreativeTab;
|
import appeng.core.CreativeTab;
|
||||||
|
import appeng.tile.AEBaseTile;
|
||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
@@ -82,6 +83,7 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
|||||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
||||||
GameRegistry.registerTileEntity( this.featured.getTileEntityClass(), this.featured.toString() );
|
GameRegistry.registerTileEntity( this.featured.getTileEntityClass(), this.featured.toString() );
|
||||||
|
AEBaseTile.registerTileItem( this.featured.getTileEntityClass(), new BlockStackSrc( this.featured, 0, ActivityState.from( this.isFeatureAvailable() ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 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 Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
public enum ActivityState
|
public enum ActivityState
|
||||||
{
|
{
|
||||||
Enabled, Disabled
|
Enabled,
|
||||||
|
Disabled;
|
||||||
|
|
||||||
|
public static ActivityState from( boolean enabled )
|
||||||
|
{
|
||||||
|
if( enabled )
|
||||||
|
{
|
||||||
|
return ActivityState.Enabled;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return ActivityState.Disabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ package appeng.core.features;
|
|||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ObjectArrays;
|
import com.google.common.collect.ObjectArrays;
|
||||||
@@ -37,8 +38,8 @@ import appeng.block.AEBaseBlock;
|
|||||||
|
|
||||||
public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
||||||
{
|
{
|
||||||
private final Block block;
|
private static final ItemBlockTransformer ITEMBLOCK_TRANSFORMER = new ItemBlockTransformer();
|
||||||
private final boolean enabled;
|
private final Optional<Block> block;
|
||||||
|
|
||||||
public BlockDefinition( Block block, ActivityState state )
|
public BlockDefinition( Block block, ActivityState state )
|
||||||
{
|
{
|
||||||
@@ -47,8 +48,14 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
|||||||
Preconditions.checkNotNull( block );
|
Preconditions.checkNotNull( block );
|
||||||
Preconditions.checkNotNull( state );
|
Preconditions.checkNotNull( state );
|
||||||
|
|
||||||
this.block = block;
|
if( state == ActivityState.Enabled )
|
||||||
this.enabled = state == ActivityState.Enabled;
|
{
|
||||||
|
this.block = Optional.of( block );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.block = Optional.absent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,7 +99,7 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
|||||||
*
|
*
|
||||||
* TODO: throw an exception instead of returning null? As this could cause issue later on.
|
* TODO: throw an exception instead of returning null? As this could cause issue later on.
|
||||||
*
|
*
|
||||||
* @param block the block to create the {@link ItemBlock} from
|
* @param block the block to create the {@link ItemBlock} from
|
||||||
* @param itemclass the class used to construct it.
|
* @param itemclass the class used to construct it.
|
||||||
*
|
*
|
||||||
* @return an {@link Item} for the block. Actually always a sub type of {@link ItemBlock}
|
* @return an {@link Item} for the block. Actually always a sub type of {@link ItemBlock}
|
||||||
@@ -121,38 +128,51 @@ public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
|||||||
@Override
|
@Override
|
||||||
public final Optional<Block> maybeBlock()
|
public final Optional<Block> maybeBlock()
|
||||||
{
|
{
|
||||||
return Optional.of( this.block );
|
return this.block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Optional<ItemBlock> maybeItemBlock()
|
public final Optional<ItemBlock> maybeItemBlock()
|
||||||
{
|
{
|
||||||
if( this.enabled )
|
return this.block.transform( ITEMBLOCK_TRANSFORMER );
|
||||||
{
|
|
||||||
return Optional.of( new ItemBlock( this.block ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Optional.absent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Optional<ItemStack> maybeStack( int stackSize )
|
public final Optional<ItemStack> maybeStack( int stackSize )
|
||||||
{
|
{
|
||||||
if( this.enabled )
|
return this.block.transform( new ItemStackTransformer( stackSize ) );
|
||||||
{
|
|
||||||
return Optional.of( new ItemStack( this.block ) );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return Optional.absent();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean isSameAs( IBlockAccess world, int x, int y, int z )
|
public final boolean isSameAs( IBlockAccess world, int x, int y, int z )
|
||||||
{
|
{
|
||||||
return this.enabled && world.getBlock( x, y, z ) == this.block;
|
return this.isEnabled() && world.getBlock( x, y, z ) == this.block.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class ItemBlockTransformer implements Function<Block, ItemBlock>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public ItemBlock apply( Block input )
|
||||||
|
{
|
||||||
|
return new ItemBlock( input );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class ItemStackTransformer implements Function<Block, ItemStack>
|
||||||
|
{
|
||||||
|
private final int stackSize;
|
||||||
|
|
||||||
|
public ItemStackTransformer( int stackSize )
|
||||||
|
{
|
||||||
|
Preconditions.checkArgument( stackSize > 0 );
|
||||||
|
|
||||||
|
this.stackSize = stackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack apply( Block input )
|
||||||
|
{
|
||||||
|
return new ItemStack( input, this.stackSize );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 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 Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
|
public class BlockStackSrc implements IStackSrc
|
||||||
|
{
|
||||||
|
|
||||||
|
public final Block block;
|
||||||
|
public final int damage;
|
||||||
|
private final boolean enabled;
|
||||||
|
|
||||||
|
public BlockStackSrc( Block block, int damage, ActivityState state )
|
||||||
|
{
|
||||||
|
Preconditions.checkNotNull( block );
|
||||||
|
Preconditions.checkArgument( damage >= 0 );
|
||||||
|
Preconditions.checkNotNull( state );
|
||||||
|
Preconditions.checkArgument( state == ActivityState.Enabled || state == ActivityState.Disabled );
|
||||||
|
|
||||||
|
this.block = block;
|
||||||
|
this.damage = damage;
|
||||||
|
this.enabled = state == ActivityState.Enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public ItemStack stack( int i )
|
||||||
|
{
|
||||||
|
return new ItemStack( this.block, i, this.damage );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item getItem()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDamage()
|
||||||
|
{
|
||||||
|
return this.damage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return this.enabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -54,7 +54,7 @@ public final class ColoredItemDefinition implements AEColoredItemDefinition
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return is.item;
|
return is.getItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -97,6 +97,6 @@ public final class ColoredItemDefinition implements AEColoredItemDefinition
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return comparableItem.getItem() == is.item && comparableItem.getItemDamage() == is.damage;
|
return comparableItem.getItem() == is.getItem() && comparableItem.getItemDamage() == is.damage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -21,6 +21,7 @@ package appeng.core.features;
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
@@ -33,27 +34,39 @@ import appeng.api.definitions.IItemDefinition;
|
|||||||
|
|
||||||
public final class DamagedItemDefinition implements IItemDefinition
|
public final class DamagedItemDefinition implements IItemDefinition
|
||||||
{
|
{
|
||||||
private final IStackSrc source;
|
private static final ItemTransformer ITEM_TRANSFORMER = new ItemTransformer();
|
||||||
|
private final Optional<IStackSrc> source;
|
||||||
|
|
||||||
public DamagedItemDefinition( @Nonnull IStackSrc source )
|
public DamagedItemDefinition( @Nonnull IStackSrc source )
|
||||||
{
|
{
|
||||||
this.source = Preconditions.checkNotNull( source );
|
Preconditions.checkNotNull( source );
|
||||||
|
|
||||||
|
if( source.isEnabled() )
|
||||||
|
{
|
||||||
|
this.source = Optional.of( source );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.source = Optional.absent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<Item> maybeItem()
|
public Optional<Item> maybeItem()
|
||||||
{
|
{
|
||||||
final Item item = this.source.getItem();
|
return this.source.transform( ITEM_TRANSFORMER );
|
||||||
|
|
||||||
return Optional.fromNullable( item );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<ItemStack> maybeStack( int stackSize )
|
public Optional<ItemStack> maybeStack( int stackSize )
|
||||||
{
|
{
|
||||||
final ItemStack stack = this.source.stack( stackSize );
|
return this.source.transform( new ItemStackTransformer( stackSize ) );
|
||||||
|
}
|
||||||
|
|
||||||
return Optional.fromNullable( stack );
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return this.source.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +77,7 @@ public final class DamagedItemDefinition implements IItemDefinition
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return comparableStack.getItem() == this.source.getItem() && comparableStack.getItemDamage() == this.source.getDamage();
|
return this.isEnabled() && comparableStack.getItem() == this.source.get().getItem() && comparableStack.getItemDamage() == this.source.get().getDamage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,4 +85,31 @@ public final class DamagedItemDefinition implements IItemDefinition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class ItemTransformer implements Function<IStackSrc, Item>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Item apply( IStackSrc input )
|
||||||
|
{
|
||||||
|
return input.getItem();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class ItemStackTransformer implements Function<IStackSrc, ItemStack>
|
||||||
|
{
|
||||||
|
private final int stackSize;
|
||||||
|
|
||||||
|
public ItemStackTransformer( int stackSize )
|
||||||
|
{
|
||||||
|
Preconditions.checkArgument( stackSize > 0 );
|
||||||
|
|
||||||
|
this.stackSize = stackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack apply( IStackSrc input )
|
||||||
|
{
|
||||||
|
return input.stack( this.stackSize );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +93,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AEItem extends AEComparable
|
private static class AEItem extends AEComparable
|
||||||
{
|
{
|
||||||
private final IItemDefinition definition;
|
private final IItemDefinition definition;
|
||||||
@@ -119,7 +119,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AEBlock extends AEItem
|
private static class AEBlock extends AEItem
|
||||||
{
|
{
|
||||||
private final IBlockDefinition definition;
|
private final IBlockDefinition definition;
|
||||||
@@ -145,7 +144,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AETile extends AEBlock
|
private static class AETile extends AEBlock
|
||||||
{
|
{
|
||||||
private final ITileDefinition definition;
|
private final ITileDefinition definition;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -31,4 +31,6 @@ public interface IStackSrc
|
|||||||
Item getItem();
|
Item getItem();
|
||||||
|
|
||||||
int getDamage();
|
int getDamage();
|
||||||
|
|
||||||
|
boolean isEnabled();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
@@ -32,41 +33,45 @@ import appeng.util.Platform;
|
|||||||
|
|
||||||
public class ItemDefinition implements IItemDefinition
|
public class ItemDefinition implements IItemDefinition
|
||||||
{
|
{
|
||||||
private final Item item;
|
private final Optional<Item> item;
|
||||||
private final boolean enabled;
|
|
||||||
|
|
||||||
public ItemDefinition( Item item, ActivityState state )
|
public ItemDefinition( Item item, ActivityState state )
|
||||||
{
|
{
|
||||||
Preconditions.checkNotNull( item );
|
Preconditions.checkNotNull( item );
|
||||||
Preconditions.checkNotNull( state );
|
Preconditions.checkNotNull( state );
|
||||||
|
|
||||||
this.item = item;
|
if( state == ActivityState.Enabled )
|
||||||
this.enabled = state == ActivityState.Enabled;
|
{
|
||||||
|
this.item = Optional.of( item );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.item = Optional.absent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Optional<Item> maybeItem()
|
public final Optional<Item> maybeItem()
|
||||||
{
|
{
|
||||||
return Optional.of( this.item );
|
return this.item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<ItemStack> maybeStack( int stackSize )
|
public Optional<ItemStack> maybeStack( int stackSize )
|
||||||
{
|
{
|
||||||
if( this.enabled )
|
return this.item.transform( new ItemStackTransformer( stackSize ) );
|
||||||
{
|
}
|
||||||
return Optional.of( new ItemStack( this.item ) );
|
|
||||||
}
|
@Override
|
||||||
else
|
public boolean isEnabled()
|
||||||
{
|
{
|
||||||
return Optional.absent();
|
return this.item.isPresent();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final boolean isSameAs( ItemStack comparableStack )
|
public final boolean isSameAs( ItemStack comparableStack )
|
||||||
{
|
{
|
||||||
return this.enabled && Platform.isSameItemType( comparableStack, this.maybeStack( 1 ).get() );
|
return this.isEnabled() && Platform.isSameItemType( comparableStack, this.maybeStack( 1 ).get() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -74,4 +79,22 @@ public class ItemDefinition implements IItemDefinition
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class ItemStackTransformer implements Function<Item, ItemStack>
|
||||||
|
{
|
||||||
|
private final int stackSize;
|
||||||
|
|
||||||
|
public ItemStackTransformer( int stackSize )
|
||||||
|
{
|
||||||
|
Preconditions.checkArgument( stackSize > 0 );
|
||||||
|
|
||||||
|
this.stackSize = stackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack apply( Item input )
|
||||||
|
{
|
||||||
|
return new ItemStack( input, this.stackSize );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -21,7 +21,8 @@ package appeng.core.features;
|
|||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
@@ -29,39 +30,27 @@ import net.minecraft.item.ItemStack;
|
|||||||
public class ItemStackSrc implements IStackSrc
|
public class ItemStackSrc implements IStackSrc
|
||||||
{
|
{
|
||||||
|
|
||||||
public final Item item;
|
private final Item item;
|
||||||
public final Block block;
|
|
||||||
public final int damage;
|
public final int damage;
|
||||||
|
private final boolean enabled;
|
||||||
|
|
||||||
public ItemStackSrc( Item i, int dmg )
|
public ItemStackSrc( Item item, int damage, ActivityState state )
|
||||||
{
|
{
|
||||||
this.block = null;
|
Preconditions.checkNotNull( item );
|
||||||
this.item = i;
|
Preconditions.checkArgument( damage >= 0 );
|
||||||
this.damage = dmg;
|
Preconditions.checkNotNull( state );
|
||||||
}
|
Preconditions.checkArgument( state == ActivityState.Enabled || state == ActivityState.Disabled );
|
||||||
|
|
||||||
public ItemStackSrc( Block b, int dmg )
|
this.item = item;
|
||||||
{
|
this.damage = damage;
|
||||||
this.item = null;
|
this.enabled = state == ActivityState.Enabled;
|
||||||
this.block = b;
|
|
||||||
this.damage = dmg;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public ItemStack stack( int i )
|
public ItemStack stack( int i )
|
||||||
{
|
{
|
||||||
if( this.block != null )
|
return new ItemStack( this.item, i, this.damage );
|
||||||
{
|
|
||||||
return new ItemStack( this.block, i, this.damage );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( this.item != null )
|
|
||||||
{
|
|
||||||
return new ItemStack( this.item, i, this.damage );
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -75,4 +64,10 @@ public class ItemStackSrc implements IStackSrc
|
|||||||
{
|
{
|
||||||
return this.damage;
|
return this.damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return this.enabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
@@ -27,12 +29,11 @@ import appeng.items.materials.MaterialType;
|
|||||||
|
|
||||||
public class MaterialStackSrc implements IStackSrc
|
public class MaterialStackSrc implements IStackSrc
|
||||||
{
|
{
|
||||||
|
private final MaterialType src;
|
||||||
final MaterialType src;
|
|
||||||
|
|
||||||
public MaterialStackSrc( MaterialType src )
|
public MaterialStackSrc( MaterialType src )
|
||||||
{
|
{
|
||||||
assert src != null;
|
Preconditions.checkNotNull( src );
|
||||||
|
|
||||||
this.src = src;
|
this.src = src;
|
||||||
}
|
}
|
||||||
@@ -54,4 +55,10 @@ public class MaterialStackSrc implements IStackSrc
|
|||||||
{
|
{
|
||||||
return this.src.damageValue;
|
return this.src.damageValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,17 +21,15 @@ package appeng.core.features;
|
|||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import com.google.common.base.Optional;
|
||||||
import net.minecraft.block.BlockSlab;
|
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
import appeng.api.definitions.IBlockDefinition;
|
import appeng.api.definitions.IBlockDefinition;
|
||||||
import appeng.block.AEBaseItemBlockSlab;
|
import appeng.block.AEBaseItemBlockSlab;
|
||||||
import appeng.block.AEBaseSlabBlock;
|
import appeng.block.AEBaseSlabBlock;
|
||||||
import appeng.core.CreativeTab;
|
import appeng.core.CreativeTab;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
|
|
||||||
public class SlabBlockFeatureHandler implements IFeatureHandler
|
public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||||
{
|
{
|
||||||
@@ -44,7 +42,7 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
|||||||
{
|
{
|
||||||
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
||||||
this.slabs = slabs;
|
this.slabs = slabs;
|
||||||
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent());
|
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent() );
|
||||||
this.enabled = state == ActivityState.Enabled;
|
this.enabled = state == ActivityState.Enabled;
|
||||||
this.definition = new BlockDefinition( slabs, state );
|
this.definition = new BlockDefinition( slabs, state );
|
||||||
}
|
}
|
||||||
@@ -67,8 +65,8 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
|||||||
if( this.enabled )
|
if( this.enabled )
|
||||||
{
|
{
|
||||||
this.slabs.setCreativeTab( CreativeTab.instance );
|
this.slabs.setCreativeTab( CreativeTab.instance );
|
||||||
GameRegistry.registerBlock( slabs, AEBaseItemBlockSlab.class, "tile." + slabs.name(), slabs, slabs.doubleSlabs(), false);
|
GameRegistry.registerBlock( this.slabs, AEBaseItemBlockSlab.class, "tile." + this.slabs.name(), this.slabs, this.slabs.doubleSlabs(), false );
|
||||||
GameRegistry.registerBlock( slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + slabs.name() + ".double", slabs, slabs.doubleSlabs(), true);
|
GameRegistry.registerBlock( this.slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + this.slabs.name() + ".double", this.slabs, this.slabs.doubleSlabs(), true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
|
|
||||||
@@ -30,7 +31,8 @@ import appeng.block.AEBaseTileBlock;
|
|||||||
|
|
||||||
public final class TileDefinition extends BlockDefinition implements ITileDefinition
|
public final class TileDefinition extends BlockDefinition implements ITileDefinition
|
||||||
{
|
{
|
||||||
private final AEBaseTileBlock block;
|
private static final TileEntityTransformer TILEENTITY_TRANSFORMER = new TileEntityTransformer();
|
||||||
|
private final Optional<AEBaseTileBlock> block;
|
||||||
|
|
||||||
public TileDefinition( AEBaseTileBlock block, ActivityState state )
|
public TileDefinition( AEBaseTileBlock block, ActivityState state )
|
||||||
{
|
{
|
||||||
@@ -40,14 +42,30 @@ public final class TileDefinition extends BlockDefinition implements ITileDefini
|
|||||||
Preconditions.checkNotNull( state );
|
Preconditions.checkNotNull( state );
|
||||||
Preconditions.checkNotNull( block.getTileEntityClass() );
|
Preconditions.checkNotNull( block.getTileEntityClass() );
|
||||||
|
|
||||||
this.block = block;
|
if( state == ActivityState.Enabled )
|
||||||
|
{
|
||||||
|
this.block = Optional.of( block );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.block = Optional.absent();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Optional<? extends Class<? extends TileEntity>> maybeEntity()
|
public Optional<? extends Class<? extends TileEntity>> maybeEntity()
|
||||||
{
|
{
|
||||||
final Class<? extends TileEntity> entity = this.block.getTileEntityClass();
|
return this.block.transform( TILEENTITY_TRANSFORMER );
|
||||||
|
}
|
||||||
|
|
||||||
return Optional.of( entity );
|
private static class TileEntityTransformer implements Function<AEBaseTileBlock, Class<? extends TileEntity>>
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Class<? extends TileEntity> apply( AEBaseTileBlock input )
|
||||||
|
{
|
||||||
|
final Class<? extends TileEntity> entity = input.getTileEntityClass();
|
||||||
|
|
||||||
|
return entity;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -77,6 +77,12 @@ public final class WrappedDamageItemDefinition implements ITileDefinition
|
|||||||
return this.definition.maybeBlock().transform( new BlockTransformFunction( stackSize, this.damage ) );
|
return this.definition.maybeBlock().transform( new BlockTransformFunction( stackSize, this.damage ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEnabled()
|
||||||
|
{
|
||||||
|
return this.definition.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isSameAs( ItemStack comparableStack )
|
public boolean isSameAs( ItemStack comparableStack )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public final class GrinderRecipeManager implements IGrinderRegistry, IOreListene
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional " + Platform.getItemDisplayName( optional ) + " for " + cost );
|
this.log( "Allow Grinding of " + Platform.getItemDisplayName( in ) + " to " + Platform.getItemDisplayName( out ) + " with optional " + Platform.getItemDisplayName( optional ) + " for " + cost );
|
||||||
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), chance, cost ) );
|
this.injectRecipe( new AppEngGrinderRecipe( this.copy( in ), this.copy( out ), this.copy( optional ), this.copy( optional2 ), chance, chance2, cost ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void injectRecipe( AppEngGrinderRecipe appEngGrinderRecipe )
|
private void injectRecipe( AppEngGrinderRecipe appEngGrinderRecipe )
|
||||||
|
|||||||
@@ -1,8 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of Applied Energistics 2.
|
||||||
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* Applied Energistics 2 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 Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||||
|
*/
|
||||||
|
|
||||||
package appeng.core.features.registries;
|
package appeng.core.features.registries;
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,12 +40,12 @@ import appeng.core.features.registries.entries.InscriberRecipe;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author thatsIch
|
* @author thatsIch
|
||||||
* @version rv2
|
* @version rv3
|
||||||
* @since rv2
|
* @since rv2
|
||||||
*/
|
*/
|
||||||
public final class InscriberRegistry implements IInscriberRegistry
|
public final class InscriberRegistry implements IInscriberRegistry
|
||||||
{
|
{
|
||||||
private final List<IInscriberRecipe> recipes;
|
private final Set<IInscriberRecipe> recipes;
|
||||||
private final Set<ItemStack> optionals;
|
private final Set<ItemStack> optionals;
|
||||||
private final Set<ItemStack> inputs;
|
private final Set<ItemStack> inputs;
|
||||||
|
|
||||||
@@ -34,14 +53,14 @@ public final class InscriberRegistry implements IInscriberRegistry
|
|||||||
{
|
{
|
||||||
this.inputs = new HashSet<ItemStack>();
|
this.inputs = new HashSet<ItemStack>();
|
||||||
this.optionals = new HashSet<ItemStack>();
|
this.optionals = new HashSet<ItemStack>();
|
||||||
this.recipes = new ArrayList<IInscriberRecipe>();
|
this.recipes = new HashSet<IInscriberRecipe>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public List<IInscriberRecipe> getRecipes()
|
public Collection<IInscriberRecipe> getRecipes()
|
||||||
{
|
{
|
||||||
return this.recipes;
|
return Collections.unmodifiableCollection( this.recipes );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -168,11 +187,11 @@ public final class InscriberRegistry implements IInscriberRegistry
|
|||||||
{
|
{
|
||||||
throw new IllegalStateException( "Output must be defined." );
|
throw new IllegalStateException( "Output must be defined." );
|
||||||
}
|
}
|
||||||
if ( this.topOptional == null && this.bottomOptional == null )
|
if( this.topOptional == null && this.bottomOptional == null )
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "One optional must be defined." );
|
throw new IllegalStateException( "One optional must be defined." );
|
||||||
}
|
}
|
||||||
if ( this.type == null )
|
if( this.type == null )
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "Process type must be defined." );
|
throw new IllegalStateException( "Process type must be defined." );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ package appeng.core.features.registries;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -19,12 +19,14 @@
|
|||||||
package appeng.core.features.registries;
|
package appeng.core.features.registries;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
|
||||||
import appeng.api.features.IPlayerRegistry;
|
import appeng.api.features.IPlayerRegistry;
|
||||||
import appeng.core.WorldSettings;
|
import appeng.core.worlddata.WorldData;
|
||||||
|
|
||||||
|
|
||||||
public class PlayerRegistry implements IPlayerRegistry
|
public class PlayerRegistry implements IPlayerRegistry
|
||||||
@@ -33,18 +35,24 @@ public class PlayerRegistry implements IPlayerRegistry
|
|||||||
@Override
|
@Override
|
||||||
public int getID( GameProfile username )
|
public int getID( GameProfile username )
|
||||||
{
|
{
|
||||||
return WorldSettings.getInstance().getPlayerID( username );
|
if( username == null || !username.isComplete() )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return WorldData.instance().playerData().getPlayerID( username );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getID( EntityPlayer player )
|
public int getID( EntityPlayer player )
|
||||||
{
|
{
|
||||||
return WorldSettings.getInstance().getPlayerID( player.getGameProfile() );
|
return this.getID( player.getGameProfile() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public EntityPlayer findPlayer( int playerID )
|
public EntityPlayer findPlayer( int playerID )
|
||||||
{
|
{
|
||||||
return WorldSettings.getInstance().getPlayerFromID( playerID );
|
return WorldData.instance().playerData().getPlayerFromID( playerID );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -19,8 +19,12 @@
|
|||||||
package appeng.core.features.registries;
|
package appeng.core.features.registries;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import appeng.api.features.IRecipeHandlerRegistry;
|
import appeng.api.features.IRecipeHandlerRegistry;
|
||||||
import appeng.api.recipes.ICraftHandler;
|
import appeng.api.recipes.ICraftHandler;
|
||||||
@@ -30,16 +34,21 @@ import appeng.core.AELog;
|
|||||||
import appeng.recipes.RecipeHandler;
|
import appeng.recipes.RecipeHandler;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AlgorithmX2
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv3 - 10.08.2015
|
||||||
|
* @since rv0
|
||||||
|
*/
|
||||||
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||||
{
|
{
|
||||||
|
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>( 20 );
|
||||||
final HashMap<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>();
|
private final Collection<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||||
final LinkedList<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler )
|
public void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler )
|
||||||
{
|
{
|
||||||
this.handlers.put( name.toLowerCase(), handler );
|
this.handlers.put( name.toLowerCase( Locale.ENGLISH ), handler );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,6 +57,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
|||||||
this.resolvers.add( sir );
|
this.resolvers.add( sir );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public ICraftHandler getCraftHandlerFor( String name )
|
public ICraftHandler getCraftHandlerFor( String name )
|
||||||
{
|
{
|
||||||
@@ -64,7 +74,9 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
|||||||
{
|
{
|
||||||
AELog.severe( "Error Caused when trying to construct " + clz.getName() );
|
AELog.severe( "Error Caused when trying to construct " + clz.getName() );
|
||||||
AELog.error( e );
|
AELog.error( e );
|
||||||
|
|
||||||
this.handlers.put( name, null ); // clear it..
|
this.handlers.put( name, null ); // clear it..
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -75,6 +87,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
|||||||
return new RecipeHandler();
|
return new RecipeHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Object resolveItem( String nameSpace, String itemName )
|
public Object resolveItem( String nameSpace, String itemName )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
@@ -94,7 +95,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if( !(o instanceof IInscriberRecipe) )
|
if( !( o instanceof IInscriberRecipe ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -113,7 +114,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ public enum ButtonToolTips
|
|||||||
BlockPlacement, BlockPlacementYes, BlockPlacementNo,
|
BlockPlacement, BlockPlacementYes, BlockPlacementNo,
|
||||||
|
|
||||||
// Used in the tooltips of the items in the terminal, when moused over
|
// Used in the tooltips of the items in the terminal, when moused over
|
||||||
ItemsStored, ItemsRequestable;
|
ItemsStored, ItemsRequestable,
|
||||||
|
|
||||||
|
SchedulingMode, SchedulingModeDefault, SchedulingModeRoundRobin, SchedulingModeRandom;
|
||||||
|
|
||||||
final String root;
|
final String root;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public enum GuiText
|
|||||||
CraftingTerminal, FormationPlane, Inscriber, QuartzCuttingKnife,
|
CraftingTerminal, FormationPlane, Inscriber, QuartzCuttingKnife,
|
||||||
|
|
||||||
// tunnel names
|
// tunnel names
|
||||||
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel,
|
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel, PressureTunnel,
|
||||||
|
|
||||||
StoredSize, CopyMode, CopyModeDesc, PatternTerminal, CraftingPattern,
|
StoredSize, CopyMode, CopyModeDesc, PatternTerminal, CraftingPattern,
|
||||||
|
|
||||||
@@ -55,9 +55,13 @@ public enum GuiText
|
|||||||
|
|
||||||
inWorldFluix, inWorldPurificationCertus, inWorldPurificationNether,
|
inWorldFluix, inWorldPurificationCertus, inWorldPurificationNether,
|
||||||
|
|
||||||
inWorldPurificationFluix, inWorldSingularity, ChargedQuartz, OfSecondOutput,
|
inWorldPurificationFluix, inWorldSingularity, ChargedQuartz,
|
||||||
|
|
||||||
NoSecondOutput, Stores, Next, SelectAmount, Lumen, Empty,
|
NoSecondOutput,
|
||||||
|
OfSecondOutput,
|
||||||
|
MultipleOutputs,
|
||||||
|
|
||||||
|
Stores, Next, SelectAmount, Lumen, Empty,
|
||||||
|
|
||||||
ConfirmCrafting, Stored, Crafting, Scheduled, CraftingStatus, Cancel, ETA, ETAFormat,
|
ConfirmCrafting, Stored, Crafting, Scheduled, CraftingStatus, Cancel, ETA, ETAFormat,
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public enum PlayerMessages
|
|||||||
isNowLocked, isNowUnlocked,
|
isNowLocked, isNowUnlocked,
|
||||||
AmmoDepleted,
|
AmmoDepleted,
|
||||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||||
SettingCleared,;
|
SettingCleared, ;
|
||||||
|
|
||||||
public IChatComponent get()
|
public IChatComponent get()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ public enum TickRates
|
|||||||
|
|
||||||
LightTunnel( 5, 120 ),
|
LightTunnel( 5, 120 ),
|
||||||
|
|
||||||
OpenComputersTunnel( 1, 5 );
|
OpenComputersTunnel( 1, 5 ),
|
||||||
|
|
||||||
|
PressureTunnel( 1, 120 );
|
||||||
|
|
||||||
public int min;
|
public int min;
|
||||||
public int max;
|
public int max;
|
||||||
|
|||||||
@@ -38,20 +38,24 @@ import appeng.core.features.AEFeature;
|
|||||||
public class PlayerStatsRegistration
|
public class PlayerStatsRegistration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the feature is enabled
|
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the
|
||||||
|
* feature is enabled
|
||||||
*/
|
*/
|
||||||
private final EventBus bus;
|
private final EventBus bus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the {@param config}
|
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
|
||||||
|
*
|
||||||
|
* @param config}
|
||||||
*/
|
*/
|
||||||
private final boolean isAchievementFeatureEnabled;
|
private final boolean isAchievementFeatureEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
||||||
*
|
*
|
||||||
* @param bus {@see #bus}
|
* @param bus {@see #bus}
|
||||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the {@link appeng.core.features.AEFeature#Achievements} is enabled
|
* @param config {@link appeng.core.AEConfig} which is used to determine if the
|
||||||
|
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||||
*/
|
*/
|
||||||
public PlayerStatsRegistration( EventBus bus, AEConfig config )
|
public PlayerStatsRegistration( EventBus bus, AEConfig config )
|
||||||
{
|
{
|
||||||
@@ -60,7 +64,9 @@ public class PlayerStatsRegistration
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is true.
|
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and
|
||||||
|
* {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is
|
||||||
|
* true.
|
||||||
*/
|
*/
|
||||||
public void registerAchievementHandlers()
|
public void registerAchievementHandlers()
|
||||||
{
|
{
|
||||||
@@ -76,7 +82,8 @@ public class PlayerStatsRegistration
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements} to a new {@link net.minecraftforge.common.AchievementPage}.
|
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements}
|
||||||
|
* to a new {@link net.minecraftforge.common.AchievementPage}.
|
||||||
*/
|
*/
|
||||||
public void registerAchievements()
|
public void registerAchievements()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
|
|||||||
{
|
{
|
||||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||||
|
|
||||||
|
|
||||||
public enum PacketTypes
|
public enum PacketTypes
|
||||||
{
|
{
|
||||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ import appeng.parts.automation.PartFormationPlane;
|
|||||||
import appeng.parts.automation.PartLevelEmitter;
|
import appeng.parts.automation.PartLevelEmitter;
|
||||||
import appeng.parts.misc.PartStorageBus;
|
import appeng.parts.misc.PartStorageBus;
|
||||||
import appeng.parts.reporting.PartCraftingTerminal;
|
import appeng.parts.reporting.PartCraftingTerminal;
|
||||||
import appeng.parts.reporting.PartMonitor;
|
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||||
import appeng.parts.reporting.PartPatternTerminal;
|
import appeng.parts.reporting.PartPatternTerminal;
|
||||||
import appeng.tile.crafting.TileCraftingTile;
|
import appeng.tile.crafting.TileCraftingTile;
|
||||||
import appeng.tile.crafting.TileMolecularAssembler;
|
import appeng.tile.crafting.TileMolecularAssembler;
|
||||||
@@ -187,7 +187,7 @@ public enum GuiBridge implements IGuiHandler
|
|||||||
|
|
||||||
GUI_CRAFTING_CONFIRM( ContainerCraftConfirm.class, ITerminalHost.class, GuiHostType.ITEM_OR_WORLD, SecurityPermissions.CRAFT ),
|
GUI_CRAFTING_CONFIRM( ContainerCraftConfirm.class, ITerminalHost.class, GuiHostType.ITEM_OR_WORLD, SecurityPermissions.CRAFT ),
|
||||||
|
|
||||||
GUI_INTERFACE_TERMINAL( ContainerInterfaceTerminal.class, PartMonitor.class, GuiHostType.WORLD, SecurityPermissions.BUILD ),
|
GUI_INTERFACE_TERMINAL( ContainerInterfaceTerminal.class, PartInterfaceTerminal.class, GuiHostType.WORLD, SecurityPermissions.BUILD ),
|
||||||
|
|
||||||
GUI_CRAFTING_STATUS( ContainerCraftingStatus.class, ITerminalHost.class, GuiHostType.ITEM_OR_WORLD, SecurityPermissions.CRAFT );
|
GUI_CRAFTING_STATUS( ContainerCraftingStatus.class, ITerminalHost.class, GuiHostType.ITEM_OR_WORLD, SecurityPermissions.CRAFT );
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -31,8 +31,8 @@ import cpw.mods.fml.common.network.FMLNetworkEvent.ServerConnectionFromClientEve
|
|||||||
import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
|
import cpw.mods.fml.common.network.FMLNetworkEvent.ServerCustomPacketEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
|
||||||
import appeng.core.WorldSettings;
|
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
|
import appeng.core.worlddata.WorldData;
|
||||||
|
|
||||||
|
|
||||||
public class NetworkHandler
|
public class NetworkHandler
|
||||||
@@ -83,7 +83,7 @@ public class NetworkHandler
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void newConnection( ServerConnectionFromClientEvent ev )
|
public void newConnection( ServerConnectionFromClientEvent ev )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().sendToPlayer( ev.manager );
|
WorldData.instance().dimensionData().sendToPlayer( ev.manager );
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@@ -91,7 +91,7 @@ public class NetworkHandler
|
|||||||
{
|
{
|
||||||
if( loginEvent.player instanceof EntityPlayerMP )
|
if( loginEvent.player instanceof EntityPlayerMP )
|
||||||
{
|
{
|
||||||
WorldSettings.getInstance().sendToPlayer( null );
|
WorldData.instance().dimensionData().sendToPlayer( null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of Applied Energistics 2.
|
* This file is part of Applied Energistics 2.
|
||||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||||
*
|
*
|
||||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Lesser General Public License as published by
|
* it under the terms of the GNU Lesser General Public License as published by
|
||||||
@@ -26,10 +26,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
|
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.core.WorldSettings;
|
|
||||||
import appeng.core.sync.AppEngPacket;
|
import appeng.core.sync.AppEngPacket;
|
||||||
import appeng.core.sync.network.INetworkInfo;
|
import appeng.core.sync.network.INetworkInfo;
|
||||||
import appeng.core.sync.network.NetworkHandler;
|
import appeng.core.sync.network.NetworkHandler;
|
||||||
|
import appeng.core.worlddata.WorldData;
|
||||||
import appeng.services.compass.ICompassCallback;
|
import appeng.services.compass.ICompassCallback;
|
||||||
|
|
||||||
|
|
||||||
@@ -79,6 +79,6 @@ public class PacketCompassRequest extends AppEngPacket implements ICompassCallba
|
|||||||
this.talkBackTo = player;
|
this.talkBackTo = player;
|
||||||
|
|
||||||
DimensionalCoord loc = new DimensionalCoord( player.worldObj, this.cx << 4, this.cdy << 5, this.cz << 4 );
|
DimensionalCoord loc = new DimensionalCoord( player.worldObj, this.cx << 4, this.cdy << 5, this.cz << 4 );
|
||||||
WorldSettings.getInstance().getCompass().getCompassDirection( loc, 174, this );
|
WorldData.instance().compassData().service().getCompassDirection( loc, 174, this );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user