Compare commits

..

20 Commits

Author SHA1 Message Date
thatsIch 200e56a509 Fixes #1536: Checking for all required BC classes 2015-06-01 20:47:04 +02:00
thatsIch 9540bbce49 Merge pull request #1499 from TheJulianJES/patch-5
Changed version from PartStack provider to rv2 (rv3)
2015-05-23 13:52:58 +02:00
TheJulianJES c6d932da04 Changed version from PartStack provider to rv2 (rv3)
because @thatsIch merged it also to rv2
2015-05-23 13:49:52 +02:00
yueh 6e7100361c Fixes #1465 faulty item comparison 2015-05-19 21:16:30 +02:00
TheJulianJES ca50ee0762 Removes default RF tooltip
Removed tab

Did something
2015-05-19 21:16:10 +02:00
TheJulianJES f00d5c297f Parts display correctly in WAILA
Register an method that can be overidden

Register the same method in the interface

New class that picks the item and displays it to WAILA

Register the new class and call the other class method

Import in PartWailaDataProvider

Fixed errors

Renamed all Display -> Stack

Stuff
2015-05-19 21:15:50 +02:00
yueh b13f5ced01 Fixes #1389 Enabled repeatable keyboard events 2015-05-19 21:14:49 +02:00
thatsIch 1c0f1ea243 Merge branch 'rv2' of https://github.com/AppliedEnergistics/Applied-Energistics-2 into rv2 2015-05-19 21:11:26 +02:00
Jeremiah Winsley b612ff47a3 Test with V6e of RotaryCraft
Conflicts:
	gradle.properties
2015-05-19 21:10:08 +02:00
Jeremiah Winsley e8a68cc531 Fixes #1384 - implement AdvancedShaftPowerReceiver for RotaryCraft powersink 2015-05-19 21:08:37 +02:00
thatsIch d9f362270b Merge pull request #1454 from TheJulianJES/doublePlayerInvInscriber
Don't add the player inventory two times (rv2)
2015-05-14 12:43:21 +02:00
TheJulianJES 37aef15a02 Don't add the player inventory two times (rv2) 2015-05-14 12:38:44 +02:00
thatsIch 2d8728f0e1 Merge pull request #1437 from TheJulianJES/GermanLang
Changed things in de_DE.lang (rv2)
2015-05-10 12:12:08 +02:00
thatsIch 3498a0902b Merge pull request #1434 from plumpudding/errorEclipse
Error eclipse for rv2 branch
2015-05-10 12:11:58 +02:00
TheJulianJES bb4b6719fe Changed things in de_DE.lang 2015-05-10 10:34:54 +02:00
TheJulianJES 34f78a7ce4 Fix warnings in eclipse
Close scanner instead of doing it with a warning

Make the scanner final..
2015-05-10 00:14:56 +02:00
thatsIch 064acc21ee Fixes #1411: Adds recipes for stairs 2015-05-08 18:36:42 +02:00
Lorenzo Dalla Costa Cervelin deeb67f07d Update pt_BR.lang 2015-05-08 17:59:55 +02:00
thatsIch 2eeaa80b59 Merge pull request #1380 from thatsIch/e-fix-javadoc
Fixed missing Javadoc parameter
2015-05-03 21:48:53 +02:00
thatsIch 7cb485aa48 Fixed missing Javadoc parameter
Reworked the instantiation a bit
Added some additional checks due to the new nonnullability.
2015-05-03 16:45:27 +02:00
616 changed files with 7687 additions and 12716 deletions
+1 -2
View File
@@ -11,8 +11,7 @@
# include markdowns
!README.md
!LICENSE
!CONTRIBUTING.md
!License.md
# include sourcecode
!src/
+3 -4
View File
@@ -1,6 +1,5 @@
<!--[![Latest Release](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) -->
[![Latest Build](https://img.shields.io/teamcity/http/ci.tsr.me/s/AppliedEnergistics_AutoHeadBuild.svg?label=Latest Build)](http://ci.tsr.me/viewType.html?buildTypeId=AppliedEnergistics_AutoHeadBuild&tab=buildTypeStatusDiv)
[![Latest Tag](https://img.shields.io/github/tag/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Tag)](https://github.com/AppliedEnergistics/Applied-Energistics-2/tags)
[![Latest Release](https://img.shields.io/github/release/AppliedEnergistics/Applied-Energistics-2.svg?label=Latest Release)](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases)
# Applied Energistics 2
@@ -32,7 +31,7 @@ A Mod about Matter, Energy and using them to conquer the world..
* Applied Energistics 2 API
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)](http://opensource.org/licenses/MIT)
- ![License](https://img.shields.io/badge/License-MIT-red.svg?style=flat)
* Applied Energistics 2
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-LGPLv3-blue.svg?style=flat)](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
@@ -40,7 +39,7 @@ A Mod about Matter, Energy and using them to conquer the world..
- (c) 2013 - 2015 AlgorithmX2 et al
- [![License](https://img.shields.io/badge/License-CC%20BY--NC--SA%203.0-yellow.svg?style=flat)](https://creativecommons.org/licenses/by-nc-sa/3.0/)
* Text and Translations
- [![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)](https://creativecommons.org/publicdomain/zero/1.0/)
- ![License](https://img.shields.io/badge/License-No%20Restriction-green.svg?style=flat)
## Downloads
+3 -6
View File
@@ -98,16 +98,12 @@ sourceSets {
resources {
srcDir "src/main/resources/"
include "assets/appliedenergistics2/recipes/**/*.recipe",
"assets/appliedenergistics2/recipes/README.html",
include "assets/appliedenergistics2/recipes/*.recipe",
"assets/appliedenergistics2/lang/*.lang",
"assets/appliedenergistics2/textures/blocks/*",
"assets/appliedenergistics2/textures/guis/*",
"assets/appliedenergistics2/textures/models/*",
"assets/appliedenergistics2/textures/items/*",
"assets/appliedenergistics2/meta/*",
"mcmod.info",
"pack.mcmeta"
"assets/appliedenergistics2/textures/items/*"
}
}
}
@@ -117,5 +113,6 @@ processResources {
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': minecraft_version
include 'pack.mcmeta'
}
}
Binary file not shown.
+10
View File
@@ -0,0 +1,10 @@
#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"?>
<profiles version="12">
<profile kind="CodeFormatterProfile" name="AE2" version="12">
<profile kind="CodeFormatterProfile" name="Algo" 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_comma_in_enum_declarations" value="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_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_new_line_in_empty_anonymous_type_declaration" value="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_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.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.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_before_parenthesized_expression_in_return" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/>
<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.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_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" 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_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.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_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.comment.preserve_white_space_between_code_and_line_comments" value="false"/>
<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.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.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.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.insert_space_after_closing_angle_bracket_in_type_arguments" value="do not insert"/>
<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.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.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.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_opening_paren_in_catch" 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_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.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.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_space_before_opening_paren_in_try" value="do not 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_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.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_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_new_line_in_empty_type_declaration" 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_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.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.alignment_for_assignment" value="0"/>
<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/>
<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.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_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_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.insert_space_before_opening_paren_in_if" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" 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.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.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_before_opening_paren_in_while" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/>
<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.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.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.insert_space_before_parenthesized_expression_in_throw" value="do not insert"/>
<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_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.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_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_paren_in_cast" 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_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.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_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_after_opening_paren_in_cast" 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.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_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_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.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="do not insert"/>
<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_synchronized" value="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_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.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.comment.indent_parameter_description" value="false"/>
<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/>
<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.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.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_before_opening_paren_in_switch" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/>
</profile>
</profiles>
-11
View File
@@ -1,11 +0,0 @@
#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
+11 -12
View File
@@ -1,5 +1,5 @@
aeversion=rv3
aechannel=alpha
aeversion=rv2
aechannel=stable
aebuild=0
aegroup=appeng
aebasename=appliedenergistics2
@@ -8,15 +8,15 @@ aebasename=appliedenergistics2
# Versions #
#########################################################
minecraft_version=1.7.10
forge_version=10.13.4.1448-1.7.10
forge_version=10.13.2.1291
#########################################################
# Installable #
#########################################################
waila_version=1.5.10
jabba_version=1.2.1a
enderstorage_version=1.4.7.36
translocator_version=1.1.2.15
enderstorage_version=1.4.7.33
translocator_version=1.1.1.14
ic2_version=2.2.717
enderio_version=2.3.0.375_beta
#cofhlib_version=1.0.1-157
@@ -29,13 +29,11 @@ invtweaks_version=1.58
#########################################################
# Provided APIs #
#########################################################
fmp_version=1.2.0.345
code_chicken_lib_version=1.1.3.138
code_chicken_core_version=1.0.7.46
nei_version=1.0.5.111
bc_version=7.0.9
opencomputers_version=1.5.12.26
pneumaticcraft_version=1.9.15-105
fmp_version=1.1.1.324
code_chicken_lib_version=1.1.3.127
code_chicken_core_version=1.0.4.35
nei_version=1.0.4.90
bc_version=6.4.6
#########################################################
# Self Compiled APIs #
@@ -55,4 +53,5 @@ api_craftguide_version=1
api_immibis_version=1
api_mfr_version=1
api_railcraft_version=1
api_rblocks_version=1
api_rf_version=2
-6
View File
@@ -10,11 +10,6 @@ task javadocJar(type: Jar, dependsOn: myJavadocs) {
from 'build/docs/javadoc/'
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task devJar(type: Jar) {
manifest {
@@ -45,5 +40,4 @@ artifacts {
archives devJar
archives apiJar
archives javadocJar
archives sourceJar
}
+1 -21
View File
@@ -1,4 +1,3 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
@@ -50,22 +49,6 @@ repositories {
name = "RX14 Proxy"
url = "http://mvn.rx14.co.uk/repo/"
}
maven {
name "OpenComputers Repo"
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
// ivy {
// name = "CoFHLib"
@@ -102,8 +85,6 @@ dependencies {
mods "com.enderio:EnderIO:${minecraft_version}-${enderio_version}:dev"
mods "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:deobf"
mods "inventorytweaks:InventoryTweaks:${invtweaks_version}:deobf"
mods "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:dev"
// mods name: 'CoFHLib', version: "[${minecraft_version}]${cofhlib_version}-dev", ext: 'jar'
// mods name: 'CoFHCore', version: "[${minecraft_version}]${cofhcore_version}-dev", ext: 'jar'
// mods name: 'ThermalExpansion', version: "[${minecraft_version}]${texpansion_version}-dev", ext: 'jar'
@@ -114,10 +95,8 @@ dependencies {
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
// provided APIs
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
compile "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:api"
compile "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:api"
@@ -133,6 +112,7 @@ dependencies {
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
compile(group: 'api', name: 'rblocks', version: "${api_rblocks_version}")
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
testCompile "junit:junit:4.11"
+2 -12
View File
@@ -1,5 +1,5 @@
task wrapper(type: Wrapper) {
gradleVersion = "2.4"
gradleVersion = "2.3"
}
// WAILA
@@ -103,14 +103,4 @@ task installBetterStorage(type: Copy, dependsOn: "deinstallBetterStorage") {
task deinstallBetterStorage(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*BetterStorage*.jar")
}
task installOpenComputers(type: Copy, dependsOn: "deinstallOpenComputers") {
from { configurations.mods }
include "**/*OpenComputer*dev*.jar"
into file(minecraft.runDir + "/mods")
}
task deinstallOpenComputers(type: Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*OpenComputers*.jar")
}
}
Binary file not shown.
+2 -2
View File
@@ -1,6 +1,6 @@
#Sat May 16 13:19:14 CEST 2015
#Sat May 02 19:28:20 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
@@ -1,30 +0,0 @@
/*
* 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
}
+2 -4
View File
@@ -54,15 +54,13 @@ public enum Settings
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 ) ),
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
private final EnumSet<? extends Enum<?>> values;
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
{
if( possibleOptions.isEmpty() )
if ( possibleOptions.isEmpty() )
{
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
}
@@ -34,6 +34,5 @@ public enum TunnelType
ITEM, // Item Tunnel
LIGHT, // Light Tunnel
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
COMPUTER_MESSAGE, // Computer Message Tunnel
PRESSURE // PneumaticCraft Tunnel
COMPUTER_MESSAGE // Computer Message Tunnel
}
@@ -77,22 +77,6 @@ public interface IBlocks
IBlockDefinition quartzPillarStair();
IBlockDefinition skyStoneSlab();
IBlockDefinition skyStoneBlockSlab();
IBlockDefinition skyStoneBrickSlab();
IBlockDefinition skyStoneSmallBrickSlab();
IBlockDefinition fluixSlab();
IBlockDefinition quartzSlab();
IBlockDefinition chiseledQuartzSlab();
IBlockDefinition quartzPillarSlab();
/*
* misc
*/
@@ -106,7 +90,7 @@ public interface IBlocks
ITileDefinition charger();
IBlockDefinition tinyTNT();
ITileDefinition tinyTNT();
ITileDefinition security();
@@ -1,34 +1,11 @@
/*
* 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;
import com.google.common.base.Optional;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import com.google.common.base.Optional;
public interface IItemDefinition extends IComparableDefinition
{
@@ -41,9 +18,4 @@ public interface IItemDefinition extends IComparableDefinition
* @return an {@link ItemStack} with specified quantity of this item.
*/
Optional<ItemStack> maybeStack( int stackSize );
/**
* @return <tt>true</tt> if definition is enabled
*/
boolean isEnabled();
}
@@ -66,8 +66,6 @@ public interface IParts
IItemDefinition annihilationPlane();
IItemDefinition identityAnnihilationPlane();
IItemDefinition formationPlane();
IItemDefinition p2PTunnelME();
@@ -84,10 +82,6 @@ public interface IParts
IItemDefinition p2PTunnelLight();
IItemDefinition p2PTunnelOpenComputers();
IItemDefinition p2PTunnelPneumaticCraft();
IItemDefinition cableAnchor();
IItemDefinition monitor();
@@ -1,15 +1,10 @@
package appeng.api.features;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import javax.annotation.Nonnull;
import com.google.common.base.Optional;
import net.minecraft.item.ItemStack;
@@ -17,26 +12,22 @@ import net.minecraft.item.ItemStack;
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
*
* @author thatsIch
* @version rv3
* @version rv2
* @since rv2
*/
public interface IInscriberRegistry
{
/**
* An immutable copy of currently registered recipes.
*
* Use the provided methods to actually modify the inscriber recipes.
*
* @see IInscriberRegistry#addRecipe(IInscriberRecipe)
* @see IInscriberRegistry#removeRecipe(IInscriberRecipe)
* Current list of registered recipes, you can modify this if you want too.
* Will never contain a null recipe
*
* @return currentlyRegisteredRecipes
*/
@Nonnull
Collection<IInscriberRecipe> getRecipes();
List<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
*/
@@ -44,7 +35,7 @@ public interface IInscriberRegistry
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
*/
@@ -52,7 +43,7 @@ public interface IInscriberRegistry
Set<ItemStack> getInputs();
/**
* Extensible way to create an inscriber recipe.
* Extensible way to create an inscriber recipe
*
* @return builder for inscriber recipes
*/
@@ -70,10 +61,9 @@ public interface IInscriberRegistry
void addRecipe( IInscriberRecipe recipe );
/**
* Removes all equal recipes from the registry.
* Removes a recipe 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 );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,8 +24,6 @@
package appeng.api.features;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import appeng.api.config.TunnelType;
@@ -41,10 +39,10 @@ public interface IP2PTunnelRegistry
* Allows third parties to register items from their mod as potential
* attunements for AE's P2P Tunnels
*
* @param trigger - the item which triggers attunement. Nullable, but then ignored
* @param type - the type of tunnel. Nullable, but then ignored
* @param trigger - the item which triggers attunement
* @param type - the type of tunnel
*/
void addNewAttunement( @Nullable ItemStack trigger, @Nullable TunnelType type );
void addNewAttunement( ItemStack trigger, TunnelType type );
/**
* returns null if no attunement can be found.
@@ -53,6 +51,5 @@ public interface IP2PTunnelRegistry
*
* @return null if no attunement can be found or attunement
*/
@Nullable
TunnelType getTunnelTypeByItem( ItemStack trigger );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,12 +24,10 @@
package appeng.api.features;
import javax.annotation.Nullable;
import net.minecraft.entity.player.EntityPlayer;
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
@@ -57,6 +55,5 @@ public interface IPlayerRegistry
*
* @return PlayerEntity, or null if the player could not be found.
*/
@Nullable
EntityPlayer findPlayer( int playerID );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,19 +24,11 @@
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv3 - 10.08.2015
* @since rv0
*/
public interface IRecipeHandlerRegistry
{
@@ -45,7 +37,7 @@ public interface IRecipeHandlerRegistry
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
* @param name name of crafthandler
* @param handler class of crafthandler
*/
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
@@ -64,7 +56,6 @@ public interface IRecipeHandlerRegistry
*
* @return A recipe handler by name, returns null on failure.
*/
@Nullable
ICraftHandler getCraftHandlerFor( String name );
/**
@@ -76,10 +67,9 @@ public interface IRecipeHandlerRegistry
* resolve sub items by name.
*
* @param nameSpace namespace of item
* @param itemName full name of item
* @param itemName full name of item
*
* @return ResolverResult or ResolverResultSet or null if could not resolve
* @return ResolverResult or ResolverResultSet
*/
@Nullable
Object resolveItem( String nameSpace, String itemName );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -38,8 +38,8 @@ public interface ISecurityRegistry
/**
* Submit Permissions into the register.
*
* @param playerID player id
* @param PlayerID player id
* @param permissions permissions of player
*/
void addPlayer( int playerID, EnumSet<SecurityPermissions> permissions );
void addPlayer( int PlayerID, EnumSet<SecurityPermissions> permissions );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -94,7 +94,7 @@ public interface IFacadePart
int getItemDamage();
boolean notAEFacade();
boolean isBC();
void setThinFacades( boolean useThinFacades );
+1 -4
View File
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -24,8 +24,6 @@
package appeng.api.parts;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
//@formatter:off
@@ -65,6 +63,5 @@ public interface IPartItem
*
* @return part from item
*/
@Nullable
IPart createPartFromItemStack( ItemStack is );
}
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
* 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
@@ -25,17 +25,10 @@ package appeng.api.recipes;
import java.io.BufferedReader;
import javax.annotation.Nonnull;
public interface IRecipeLoader
{
/**
* @param filePath the path to the to be loaded file
*
* @return reader handler of the file
*
* @throws Exception if reading goes wrong
*/
BufferedReader getFile( @Nonnull String filePath ) throws Exception;
BufferedReader getFile( String s ) throws Exception;
}
@@ -24,7 +24,7 @@
package appeng.api.util;
import java.util.List;
import java.util.ArrayList;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
@@ -43,5 +43,5 @@ public interface ICommonTile
* @param z z pos of tile entity
* @param drops drops of tile entity
*/
void getDrops( World world, int x, int y, int z, List<ItemStack> drops );
void getDrops( World world, int x, int y, int z, ArrayList<ItemStack> drops );
}
+380 -81
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -22,19 +22,24 @@ package appeng.block;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import com.google.common.base.Optional;
import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.client.resources.IResource;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
@@ -44,11 +49,21 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.ReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import appeng.api.implementations.items.IMemoryCard;
import appeng.api.implementations.items.MemoryCardMessages;
import appeng.api.implementations.tiles.IColorableTile;
import appeng.api.util.AEColor;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.networking.BlockCableBus;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.BlockRenderInfo;
import appeng.client.render.WorldRender;
@@ -59,34 +74,45 @@ import appeng.core.features.AEFeature;
import appeng.core.features.FeatureNameExtractor;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
import appeng.core.features.ItemStackSrc;
import appeng.helpers.AEGlassMaterial;
import appeng.helpers.ICustomCollision;
import appeng.tile.AEBaseTile;
import appeng.tile.networking.TileCableBus;
import appeng.tile.storage.TileSkyChest;
import appeng.util.LookDirection;
import appeng.util.Platform;
import appeng.util.SettingsFrom;
public abstract class AEBaseBlock extends Block implements IAEFeature
public class AEBaseBlock extends BlockContainer implements IAEFeature
{
private final String featureFullName;
protected final Optional<String> featureSubName;
private final Optional<String> featureSubName;
@SideOnly( Side.CLIENT )
public IIcon renderIcon;
protected boolean isOpaque = true;
protected boolean isFullSize = true;
protected boolean hasSubtypes = false;
protected boolean isInventory = false;
private IFeatureHandler handler;
@SideOnly( Side.CLIENT )
BlockRenderInfo renderInfo;
private IFeatureHandler handler;
protected AEBaseBlock( Material mat )
@Nullable
private Class<? extends TileEntity> tileEntityType = null;
protected AEBaseBlock( Class<? extends AEBaseBlock> c, Material mat )
{
this( mat, Optional.<String>absent() );
this( c, mat, Optional.<String>absent() );
this.setLightOpacity( 255 );
this.setLightLevel( 0 );
this.setHardness( 2.2F );
this.setTileProvider( false );
this.setHarvestLevel( "pickaxe", 0 );
}
protected AEBaseBlock( Material mat, Optional<String> subName )
protected AEBaseBlock( Class<?> c, Material mat, Optional<String> subName )
{
super( mat );
@@ -107,10 +133,16 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
this.setStepSound( Block.soundTypeMetal );
}
this.featureFullName = new FeatureNameExtractor( this.getClass(), subName ).get();
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
this.featureSubName = subName;
}
// update Block value.
private void setTileProvider( boolean b )
{
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
}
@Override
public String toString()
{
@@ -119,8 +151,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
public void registerNoIcons()
{
final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
BlockRenderInfo info = this.getRendererInstance();
FlippableIcon i = new FlippableIcon( new MissingIcon( this ) );
info.updateIcons( i, i, i, i, i, i );
}
@@ -139,7 +171,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return this.renderInfo;
}
catch( InstantiationException e )
catch ( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e );
}
@@ -160,10 +192,24 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return super.getIcon( w, x, y, z, s );
}
protected void setTileEntity( Class<? extends TileEntity> c )
{
this.tileEntityType = c;
AEBaseTile.registerTileItem( c, new ItemStackSrc( this, 0 ) );
GameRegistry.registerTileEntity( this.tileEntityType, this.featureFullName );
this.isInventory = IInventory.class.isAssignableFrom( c );
this.setTileProvider( this.hasBlockTileEntity() );
}
public boolean hasBlockTileEntity()
{
return this.tileEntityType != null;
}
protected void setFeature( EnumSet<AEFeature> f )
{
final AEBlockFeatureHandler featureHandler = new AEBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
this.handler = new AEBlockFeatureHandler( f, this, this.featureSubName );
}
@Override
@@ -172,11 +218,6 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return this.handler;
}
protected final void setHandler( IFeatureHandler handler )
{
this.handler = handler;
}
@Override
public void postInit()
{
@@ -211,16 +252,12 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@SideOnly( Side.CLIENT )
public IIcon getIcon( int direction, int metadata )
{
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
}
protected ICustomCollision getCustomCollision( World w, int x, int y, int z )
{
if( this instanceof ICustomCollision )
if( this.renderIcon != null )
{
return (ICustomCollision) this;
return this.renderIcon;
}
return null;
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
}
@Override
@@ -228,7 +265,20 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
// NOTE: WAS FINAL, changed for Immibis
public void addCollisionBoxesToList( World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e )
{
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
ICustomCollision collisionHandler = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
if( collisionHandler != null && bb != null )
{
@@ -258,16 +308,30 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@SideOnly( Side.CLIENT )
public final AxisAlignedBB getSelectedBoundingBoxFromPool( World w, int x, int y, int z )
{
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
ICustomCollision collisionHandler = null;
AxisAlignedBB b = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
if( collisionHandler != null )
{
if( Platform.isClient() )
{
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
final LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
LookDirection ld = Platform.getPlayerRay( player, Platform.getEyeOffset( player ) );
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, Minecraft.getMinecraft().thePlayer, true );
AxisAlignedBB br = null;
double lastDist = 0;
@@ -282,12 +346,11 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
if( r != null )
{
final double xLen = ( ld.a.xCoord - r.hitVec.xCoord );
final double yLen = ( ld.a.yCoord - r.hitVec.yCoord );
final double zLen = ( ld.a.zCoord - r.hitVec.zCoord );
final double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
double xLen = ( ld.a.xCoord - r.hitVec.xCoord );
double yLen = ( ld.a.yCoord - r.hitVec.yCoord );
double zLen = ( ld.a.zCoord - r.hitVec.zCoord );
double thisDist = xLen * xLen + yLen * yLen + zLen * zLen;
if( br == null || lastDist > thisDist )
{
lastDist = thisDist;
@@ -303,26 +366,32 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
}
}
final AxisAlignedBB b = AxisAlignedBB.getBoundingBox( 16d, 16d, 16d, 0d, 0d, 0d );
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ) )
{
final double minX = Math.min( b.minX, bx.minX );
final double minY = Math.min( b.minY, bx.minY );
final double minZ = Math.min( b.minZ, bx.minZ );
final double maxX = Math.max( b.maxX, bx.maxX );
final double maxY = Math.max( b.maxY, bx.maxY );
final double maxZ = Math.max( b.maxZ, bx.maxZ );
b.setBounds( minX, minY, minZ, maxX, maxY, maxZ );
if( b == null )
{
b = bx;
}
else
{
double minX = Math.min( b.minX, bx.minX );
double minY = Math.min( b.minY, bx.minY );
double minZ = Math.min( b.minZ, bx.minZ );
double maxX = Math.max( b.maxX, bx.maxX );
double maxY = Math.max( b.maxY, bx.maxY );
double maxZ = Math.max( b.maxZ, bx.maxZ );
b.setBounds( minX, minY, minZ, maxX, maxY, maxZ );
}
}
b.setBounds( b.minX + x, b.minY + y, b.minZ + z, b.maxX + x, b.maxY + y, b.maxZ + z );
return b;
}
else
{
b = super.getSelectedBoundingBoxFromPool( w, x, y, z );
}
return super.getSelectedBoundingBoxFromPool( w, x, y, z );
return b;
}
@Override
@@ -334,11 +403,24 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override
public MovingObjectPosition collisionRayTrace( World w, int x, int y, int z, Vec3 a, Vec3 b )
{
final ICustomCollision collisionHandler = this.getCustomCollision( w, x, y, z );
ICustomCollision collisionHandler = null;
if( this instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) this;
}
else
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
collisionHandler = (ICustomCollision) te;
}
}
if( collisionHandler != null )
{
final Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, true );
Iterable<AxisAlignedBB> bbs = collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, true );
MovingObjectPosition br = null;
double lastDist = 0;
@@ -370,7 +452,6 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
{
return br;
}
return null;
}
@@ -378,11 +459,114 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return super.collisionRayTrace( w, x, y, z, a, b );
}
@Override
public final boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{
if( player != null )
{
ItemStack is = player.inventory.getCurrentItem();
if( is != null )
{
if( Platform.isWrench( player, is, x, y, z ) && player.isSneaking() )
{
Block id = w.getBlock( x, y, z );
if( id != null )
{
AEBaseTile tile = this.getTileEntity( w, x, y, z );
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
if( tile == null )
{
return false;
}
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
{
return false;
}
ItemStack op = new ItemStack( this );
for( ItemStack ol : drops )
{
if( Platform.isSameItemType( ol, op ) )
{
NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
if( tag != null )
{
ol.setTagCompound( tag );
}
}
}
if( id.removedByPlayer( w, player, x, y, z, false ) )
{
List<ItemStack> l = Lists.newArrayList( drops );
Platform.spawnDrops( w, x, y, z, l );
w.setBlockToAir( x, y, z );
}
}
return false;
}
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
{
IMemoryCard memoryCard = (IMemoryCard) is.getItem();
if( player.isSneaking() )
{
AEBaseTile t = this.getTileEntity( w, x, y, z );
if( t != null )
{
String name = this.getUnlocalizedName();
NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if( data != null )
{
memoryCard.setMemoryCardContents( is, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
return true;
}
}
}
else
{
String name = memoryCard.getSettingsName( is );
NBTTagCompound data = memoryCard.getData( is );
if( this.getUnlocalizedName().equals( name ) )
{
AEBaseTile t = this.getTileEntity( w, x, y, z );
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
}
else
{
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
return false;
}
}
}
}
return this.onActivated( w, x, y, z, player, side, hitX, hitY, hitZ );
}
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{
return false;
}
@Override
public void onBlockPlacedBy( World w, int x, int y, int z, EntityLivingBase player, ItemStack is )
{
if( is.hasDisplayName() )
{
TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof AEBaseTile )
{
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
}
}
}
@Override
@SideOnly( Side.CLIENT )
@SuppressWarnings( "unchecked" )
@@ -400,6 +584,11 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@Override
public int getComparatorInputOverride( World w, int x, int y, int z, int s )
{
TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof IInventory )
{
return Container.calcRedstoneFromInventory( (IInventory) te );
}
return 0;
}
@@ -407,14 +596,14 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
@SideOnly( Side.CLIENT )
public void registerBlockIcons( IIconRegister iconRegistry )
{
final BlockRenderInfo info = this.getRendererInstance();
final FlippableIcon topIcon;
final FlippableIcon bottomIcon;
final FlippableIcon sideIcon;
final FlippableIcon eastIcon;
final FlippableIcon westIcon;
final FlippableIcon southIcon;
final FlippableIcon northIcon;
BlockRenderInfo info = this.getRendererInstance();
FlippableIcon topIcon;
FlippableIcon bottomIcon;
FlippableIcon sideIcon;
FlippableIcon eastIcon;
FlippableIcon westIcon;
FlippableIcon southIcon;
FlippableIcon northIcon;
this.blockIcon = topIcon = this.optionalIcon( iconRegistry, this.getTextureName(), null );
bottomIcon = this.optionalIcon( iconRegistry, this.getTextureName() + "Bottom", topIcon );
@@ -433,19 +622,19 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return this.isFullSize;
}
public IOrientable getOrientable( IBlockAccess w, int x, int y, int z )
{
if( this instanceof IOrientableBlock )
{
return ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
return null;
}
@Override
public final boolean rotateBlock( World w, int x, int y, int z, ForgeDirection axis )
{
final IOrientable rotatable = this.getOrientable( w, x, y, z );
IOrientable rotatable = null;
if( this.hasBlockTileEntity() )
{
rotatable = (AEBaseTile) this.getTileEntity( w, x, y, z );
}
else if( this instanceof IOrientableBlock )
{
rotatable = ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
if( rotatable != null && rotatable.canBeRotated() )
{
@@ -492,13 +681,44 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
}
@Override
public ForgeDirection[] getValidRotations( World w, int x, int y, int z )
public final ForgeDirection[] getValidRotations( World w, int x, int y, int z )
{
if( this.hasBlockTileEntity() )
{
AEBaseTile obj = this.getTileEntity( w, x, y, z );
if( obj != null && obj.canBeRotated() )
{
return ForgeDirection.VALID_DIRECTIONS;
}
}
return new ForgeDirection[0];
}
@Override
public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour )
{
TileEntity te = this.getTileEntity( world, x, y, z );
if( te instanceof IColorableTile )
{
IColorableTile ct = (IColorableTile) te;
AEColor c = ct.getColor();
AEColor newColor = AEColor.values()[colour];
if( c != newColor )
{
ct.recolourBlock( side, newColor, null );
return true;
}
return false;
}
return super.recolourBlock( world, x, y, z, side, colour );
}
@SideOnly( Side.CLIENT )
private FlippableIcon optionalIcon( IIconRegister ir, String name, IIcon substitute )
private FlippableIcon optionalIcon( IIconRegister ir, String Name, IIcon substitute )
{
// if the input is an flippable IIcon find the original.
while( substitute instanceof FlippableIcon )
@@ -510,13 +730,13 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
{
try
{
ResourceLocation resLoc = new ResourceLocation( name );
ResourceLocation resLoc = new ResourceLocation( Name );
resLoc = new ResourceLocation( resLoc.getResourceDomain(), String.format( "%s/%s%s", "textures/blocks", resLoc.getResourcePath(), ".png" ) );
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
if( res != null )
{
return new FlippableIcon( ir.registerIcon( name ) );
return new FlippableIcon( ir.registerIcon( Name ) );
}
}
catch( Throwable e )
@@ -525,7 +745,7 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
}
}
return new FlippableIcon( ir.registerIcon( name ) );
return new FlippableIcon( ir.registerIcon( Name ) );
}
@SideOnly( Side.CLIENT )
@@ -536,7 +756,16 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
int mapRotation( IBlockAccess w, int x, int y, int z, int s )
{
final IOrientable ori = this.getOrientable( w, x, y, z );
IOrientable ori = null;
if( this.hasBlockTileEntity() )
{
ori = (AEBaseTile) this.getTileEntity( w, x, y, z );
}
else if( this instanceof IOrientableBlock )
{
ori = ( (IOrientableBlock) this ).getOrientable( w, x, y, z );
}
if( ori != null && ori.canBeRotated() )
{
@@ -546,6 +775,23 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return s;
}
@Nullable
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
if( !this.hasBlockTileEntity() )
{
return null;
}
TileEntity te = w.getTileEntity( x, y, z );
if( this.tileEntityType.isInstance( te ) )
{
return (T) te;
}
return null;
}
public ForgeDirection mapRotation( IOrientable ori, ForgeDirection dir )
{
// case DOWN: return bottomIcon;
@@ -555,8 +801,8 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
// case WEST: return sideIcon;
// case EAST: return sideIcon;
final ForgeDirection forward = ori.getForward();
final ForgeDirection up = ori.getUp();
ForgeDirection forward = ori.getForward();
ForgeDirection up = ori.getUp();
ForgeDirection west = ForgeDirection.UNKNOWN;
if( forward == null || up == null )
@@ -606,12 +852,66 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
return ForgeDirection.UNKNOWN;
}
public Class<? extends TileEntity> getTileEntityClass()
{
return this.tileEntityType;
}
@SideOnly( Side.CLIENT )
public void setRenderStateByMeta( int itemDamage )
{
}
@Override
public final TileEntity createNewTileEntity( World var1, int var2 )
{
if( this.hasBlockTileEntity() )
{
try
{
return this.tileEntityType.newInstance();
}
catch( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType , e );
}
catch( IllegalAccessException e )
{
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
}
}
return null;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te != null )
{
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if( te.dropItems() )
{
te.getDrops( w, x, y, z, drops );
}
else
{
te.getNoDrops( w, x, y, z, drops );
}
// Cry ;_; ...
Platform.spawnDrops( w, x, y, z, drops );
}
super.breakBlock( w, x, y, z, a, b );
if( te != null )
{
w.setTileEntity( x, y, z, null );
}
}
public String getUnlocalizedName( ItemStack is )
{
return this.getUnlocalizedName();
@@ -631,5 +931,4 @@ public abstract class AEBaseBlock extends Block implements IAEFeature
{
return this.hasSubtypes;
}
}
@@ -47,7 +47,7 @@ import appeng.util.Platform;
public class AEBaseItemBlock extends ItemBlock
{
private final AEBaseBlock blockType;
final AEBaseBlock blockType;
public AEBaseItemBlock( Block id )
{
@@ -105,7 +105,7 @@ public class AEBaseItemBlock extends ItemBlock
IOrientable ori = null;
if( this.blockType instanceof AEBaseTileBlock )
if( this.blockType.hasBlockTileEntity() )
{
if( this.blockType instanceof BlockLightDetector )
{
@@ -185,9 +185,9 @@ public class AEBaseItemBlock extends ItemBlock
if( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
{
if( this.blockType instanceof AEBaseTileBlock && !( this.blockType instanceof BlockLightDetector ) )
if( this.blockType.hasBlockTileEntity() && !( this.blockType instanceof BlockLightDetector ) )
{
AEBaseTile tile = ( (AEBaseTileBlock) this.blockType ).getTileEntity( w, x, y, z );
AEBaseTile tile = this.blockType.getTileEntity( w, x, y, z );
ori = tile;
if( tile == null )
@@ -198,7 +198,7 @@ public class AEBaseItemBlock extends ItemBlock
if( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
{
if( ori.getForward() == null || ori.getUp() == null || // null
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
{
ori.setOrientation( forward, up );
}
@@ -51,7 +51,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
@SideOnly( Side.CLIENT )
public void addCheckedInformation( ItemStack itemStack, EntityPlayer player, List<String> toolTip, boolean advancedTooltips )
{
final NBTTagCompound tag = itemStack.getTagCompound();
NBTTagCompound tag = itemStack.getTagCompound();
double internalCurrentPower = 0;
double internalMaxPower = this.getMaxEnergyCapacity();
@@ -60,14 +60,14 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
internalCurrentPower = tag.getDouble( "internalCurrentPower" );
}
final double percent = internalCurrentPower / internalMaxPower;
double percent = internalCurrentPower / internalMaxPower;
toolTip.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
}
private double getMaxEnergyCapacity()
{
final Block blockID = Block.getBlockFromItem( this );
Block blockID = Block.getBlockFromItem( this );
final IBlockDefinition energyCell = Api.INSTANCE.definitions().blocks().energyCell();
for( Block block : energyCell.maybeBlock().asSet() )
{
@@ -104,13 +104,13 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
private double getInternal( ItemStack is )
{
final NBTTagCompound nbt = Platform.openNbtData( is );
NBTTagCompound nbt = Platform.openNbtData( is );
return nbt.getDouble( "internalCurrentPower" );
}
private void setInternal( ItemStack is, double amt )
{
final NBTTagCompound nbt = Platform.openNbtData( is );
NBTTagCompound nbt = Platform.openNbtData( is );
nbt.setDouble( "internalCurrentPower", amt );
}
@@ -1,16 +0,0 @@
package appeng.block;
import net.minecraft.block.Block;
import net.minecraft.item.ItemSlab;
public class AEBaseItemBlockSlab extends ItemSlab
{
public AEBaseItemBlockSlab( Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab )
{
super( block, singleSlab, doubleSlab, isDoubleSlab );
}
}
@@ -1,139 +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.block;
import java.util.EnumSet;
import java.util.Random;
import net.minecraft.block.BlockSlab;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import appeng.core.features.AEFeature;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
import appeng.core.features.SlabBlockFeatureHandler;
public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
{
private final IFeatureHandler features;
private final AEBaseBlock block;
private final int meta;
private AEBaseSlabBlock slabs;
private AEBaseSlabBlock doubleSlabs;
private final String name;
public AEBaseSlabBlock( AEBaseBlock block, int meta, EnumSet<AEFeature> features, boolean isDoubleSlab, String name )
{
super( isDoubleSlab, block.getMaterial() );
this.block = block;
this.meta = meta;
this.name = name;
this.setBlockName( "appliedenergistics2." + name );
this.setHardness( block.getBlockHardness( null, 0, 0, 0 ) );
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
this.setStepSound( block.stepSound );
this.useNeighborBrightness = true;
if( !this.field_150004_a )
{
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 )
{
this.slabs = slabs;
return this;
}
public AEBaseSlabBlock slabs()
{
return this.slabs;
}
public AEBaseSlabBlock doubleSlabs()
{
return this.doubleSlabs;
}
@Override
public IFeatureHandler handler()
{
return this.features;
}
@Override
public void postInit()
{
// Override to do stuff
}
@Override
public IIcon getIcon( int dir, int meta )
{
return this.block.getIcon( dir, this.meta );
}
@Override
public String func_150002_b( int p_150002_1_ )
{
return this.getUnlocalizedName();
}
@Override
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
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
{
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock( x, y, z );
if( block == null )
{
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()
{
return this.name;
}
}
@@ -21,11 +21,11 @@ package appeng.block;
import java.util.EnumSet;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;
import com.google.common.base.Optional;
import appeng.core.features.AEFeature;
import appeng.core.features.IAEFeature;
import appeng.core.features.IFeatureHandler;
@@ -1,348 +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.block;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.google.common.base.Optional;
import com.google.common.collect.Lists;
import net.minecraft.block.Block;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.ReflectionHelper;
import appeng.api.implementations.items.IMemoryCard;
import appeng.api.implementations.items.MemoryCardMessages;
import appeng.api.implementations.tiles.IColorableTile;
import appeng.api.util.AEColor;
import appeng.api.util.IOrientable;
import appeng.block.networking.BlockCableBus;
import appeng.core.features.AEFeature;
import appeng.core.features.AETileBlockFeatureHandler;
import appeng.core.features.IAEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.AEBaseTile;
import appeng.tile.networking.TileCableBus;
import appeng.tile.storage.TileSkyChest;
import appeng.util.Platform;
import appeng.util.SettingsFrom;
public abstract class AEBaseTileBlock extends AEBaseBlock implements IAEFeature, ITileEntityProvider
{
@Nonnull
private Class<? extends TileEntity> tileEntityType;
public AEBaseTileBlock( Material mat )
{
super( mat );
}
protected AEBaseTileBlock( Material mat, Optional<String> subName )
{
super( mat, subName );
}
@Override
protected void setFeature( EnumSet<AEFeature> f )
{
final AETileBlockFeatureHandler featureHandler = new AETileBlockFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
}
protected void setTileEntity( Class<? extends TileEntity> c )
{
this.tileEntityType = c;
this.isInventory = IInventory.class.isAssignableFrom( c );
this.setTileProvider( this.hasBlockTileEntity() );
}
// update Block value.
private void setTileProvider( boolean b )
{
ReflectionHelper.setPrivateValue( Block.class, this, b, "isTileProvider" );
}
public boolean hasBlockTileEntity()
{
return this.tileEntityType != null;
}
public Class<? extends TileEntity> getTileEntityClass()
{
return this.tileEntityType;
}
@Nullable
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
if( !this.hasBlockTileEntity() )
{
return null;
}
final TileEntity te = w.getTileEntity( x, y, z );
if( this.tileEntityType.isInstance( te ) )
{
return (T) te;
}
return null;
}
@Override
public final TileEntity createNewTileEntity( World var1, int var2 )
{
if( this.hasBlockTileEntity() )
{
try
{
return this.tileEntityType.newInstance();
}
catch( InstantiationException e )
{
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType, e );
}
catch( IllegalAccessException e )
{
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
}
}
return null;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
final AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te != null )
{
final ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
if( te.dropItems() )
{
te.getDrops( w, x, y, z, drops );
}
else
{
te.getNoDrops( w, x, y, z, drops );
}
// Cry ;_; ...
Platform.spawnDrops( w, x, y, z, drops );
}
// super will remove the TE, as it is not an instance of BlockContainer
super.breakBlock( w, x, y, z, a, b );
}
@Override
public final ForgeDirection[] getValidRotations( World w, int x, int y, int z )
{
final AEBaseTile obj = this.getTileEntity( w, x, y, z );
if( obj != null && obj.canBeRotated() )
{
return ForgeDirection.VALID_DIRECTIONS;
}
return super.getValidRotations( w, x, y, z );
}
@Override
public boolean recolourBlock( World world, int x, int y, int z, ForgeDirection side, int colour )
{
final TileEntity te = this.getTileEntity( world, x, y, z );
if( te instanceof IColorableTile )
{
final IColorableTile ct = (IColorableTile) te;
final AEColor c = ct.getColor();
final AEColor newColor = AEColor.values()[colour];
if( c != newColor )
{
ct.recolourBlock( side, newColor, null );
return true;
}
return false;
}
return super.recolourBlock( world, x, y, z, side, colour );
}
@Override
public int getComparatorInputOverride( World w, int x, int y, int z, int s )
{
final TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof IInventory )
{
return Container.calcRedstoneFromInventory( (IInventory) te );
}
return 0;
}
@Override
public boolean onBlockEventReceived( World p_149696_1_, int p_149696_2_, int p_149696_3_, int p_149696_4_, int p_149696_5_, int p_149696_6_ )
{
super.onBlockEventReceived( p_149696_1_, p_149696_2_, p_149696_3_, p_149696_4_, p_149696_5_, p_149696_6_ );
final TileEntity tileentity = p_149696_1_.getTileEntity( p_149696_2_, p_149696_3_, p_149696_4_ );
return tileentity != null ? tileentity.receiveClientEvent( p_149696_5_, p_149696_6_ ) : false;
}
@Override
public void onBlockPlacedBy( World w, int x, int y, int z, EntityLivingBase player, ItemStack is )
{
if( is.hasDisplayName() )
{
final TileEntity te = this.getTileEntity( w, x, y, z );
if( te instanceof AEBaseTile )
{
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
}
}
}
@Override
public final boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
{
if( player != null )
{
final ItemStack is = player.inventory.getCurrentItem();
if( is != null )
{
if( Platform.isWrench( player, is, x, y, z ) && player.isSneaking() )
{
final Block id = w.getBlock( x, y, z );
if( id != null )
{
final AEBaseTile tile = this.getTileEntity( w, x, y, z );
final ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
if( tile == null )
{
return false;
}
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
{
return false;
}
final ItemStack op = new ItemStack( this );
for( ItemStack ol : drops )
{
if( Platform.isSameItemType( ol, op ) )
{
final NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
if( tag != null )
{
ol.setTagCompound( tag );
}
}
}
if( id.removedByPlayer( w, player, x, y, z, false ) )
{
final List<ItemStack> l = Lists.newArrayList( drops );
Platform.spawnDrops( w, x, y, z, l );
w.setBlockToAir( x, y, z );
}
}
return false;
}
if( is.getItem() instanceof IMemoryCard && !( this instanceof BlockCableBus ) )
{
final IMemoryCard memoryCard = (IMemoryCard) is.getItem();
if( player.isSneaking() )
{
final AEBaseTile t = this.getTileEntity( w, x, y, z );
if( t != null )
{
final String name = this.getUnlocalizedName();
final NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
if( data != null )
{
memoryCard.setMemoryCardContents( is, name, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
return true;
}
}
}
else
{
final String name = memoryCard.getSettingsName( is );
final NBTTagCompound data = memoryCard.getData( is );
if( this.getUnlocalizedName().equals( name ) )
{
final AEBaseTile t = this.getTileEntity( w, x, y, z );
t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
}
else
{
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
}
return false;
}
}
}
}
return this.onActivated( w, x, y, z, player, side, hitX, hitY, hitZ );
}
@Override
public IOrientable getOrientable( IBlockAccess w, int x, int y, int z )
{
return this.getTileEntity( w, x, y, z );
}
@Override
public ICustomCollision getCustomCollision( World w, int x, int y, int z )
{
final AEBaseTile te = this.getTileEntity( w, x, y, z );
if( te instanceof ICustomCollision )
{
return (ICustomCollision) te;
}
return super.getCustomCollision( w, x, y, z );
}
}
@@ -26,9 +26,9 @@ import net.minecraft.world.IBlockAccess;
public class AEDecorativeBlock extends AEBaseBlock
{
public AEDecorativeBlock( Material mat )
public AEDecorativeBlock( Class<? extends AEBaseBlock> c, Material mat )
{
super( mat );
super( c, mat );
}
@Override
@@ -40,8 +40,11 @@ import appeng.tile.crafting.TileCraftingMonitorTile;
public class BlockCraftingMonitor extends BlockCraftingUnit
{
public BlockCraftingMonitor()
{
super( BlockCraftingMonitor.class );
this.setTileEntity( TileCraftingMonitorTile.class );
}
@@ -37,6 +37,8 @@ public class BlockCraftingStorage extends BlockCraftingUnit
{
public BlockCraftingStorage()
{
super( BlockCraftingStorage.class );
this.setTileEntity( TileCraftingStorageTile.class );
}
@@ -35,7 +35,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCraftingCPU;
import appeng.client.texture.ExtraBlockTextures;
@@ -45,16 +45,22 @@ import appeng.tile.crafting.TileCraftingTile;
import appeng.util.Platform;
public class BlockCraftingUnit extends AEBaseTileBlock
public class BlockCraftingUnit extends AEBaseBlock
{
public static final int FLAG_FORMED = 8;
public BlockCraftingUnit()
{
super( Material.iron );
this( BlockCraftingUnit.class );
this.setTileEntity( TileCraftingTile.class );
}
public BlockCraftingUnit( Class<? extends BlockCraftingUnit> childClass )
{
super( childClass, Material.iron );
this.hasSubtypes = true;
this.setTileEntity( TileCraftingTile.class );
this.setFeature( EnumSet.of( AEFeature.CraftingCPU ) );
}
@@ -29,7 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockAssembler;
import appeng.core.features.AEFeature;
@@ -38,15 +38,14 @@ import appeng.tile.crafting.TileMolecularAssembler;
import appeng.util.Platform;
public class BlockMolecularAssembler extends AEBaseTileBlock
public class BlockMolecularAssembler extends AEBaseBlock
{
public static boolean booleanAlphaPass = false;
public BlockMolecularAssembler()
{
super( Material.iron );
super( BlockMolecularAssembler.class, Material.iron );
this.setTileEntity( TileMolecularAssembler.class );
this.isOpaque = false;
this.lightOpacity = 1;
@@ -32,7 +32,7 @@ import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.implementations.tiles.ICrankable;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCrank;
import appeng.core.features.AEFeature;
@@ -41,13 +41,12 @@ import appeng.tile.AEBaseTile;
import appeng.tile.grindstone.TileCrank;
public class BlockCrank extends AEBaseTileBlock
public class BlockCrank extends AEBaseBlock
{
public BlockCrank()
{
super( Material.wood );
super( BlockCrank.class, Material.wood );
this.setTileEntity( TileCrank.class );
this.setLightOpacity( 0 );
this.setHarvestLevel( "axe", 0 );
@@ -26,20 +26,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.grindstone.TileGrinder;
import appeng.util.Platform;
public class BlockGrinder extends AEBaseTileBlock
public class BlockGrinder extends AEBaseBlock
{
public BlockGrinder()
{
super( Material.rock );
super( BlockGrinder.class, Material.rock );
this.setTileEntity( TileGrinder.class );
this.setHardness( 3.2F );
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
@@ -26,20 +26,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileCellWorkbench;
import appeng.util.Platform;
public class BlockCellWorkbench extends AEBaseTileBlock
public class BlockCellWorkbench extends AEBaseBlock
{
public BlockCellWorkbench()
{
super( Material.iron );
super( BlockCellWorkbench.class, Material.iron );
this.setTileEntity( TileCellWorkbench.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
}
@@ -36,7 +36,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.AEApi;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockCharger;
import appeng.client.render.effects.LightningFX;
@@ -49,13 +49,12 @@ import appeng.tile.misc.TileCharger;
import appeng.util.Platform;
public class BlockCharger extends AEBaseTileBlock implements ICustomCollision
public class BlockCharger extends AEBaseBlock implements ICustomCollision
{
public BlockCharger()
{
super( Material.iron );
super( BlockCharger.class, Material.iron );
this.setTileEntity( TileCharger.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
@@ -26,20 +26,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.misc.TileCondenser;
import appeng.util.Platform;
public class BlockCondenser extends AEBaseTileBlock
public class BlockCondenser extends AEBaseBlock
{
public BlockCondenser()
{
super( Material.iron );
super( BlockCondenser.class, Material.iron );
this.setTileEntity( TileCondenser.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockInscriber;
import appeng.core.features.AEFeature;
@@ -35,13 +35,12 @@ import appeng.tile.misc.TileInscriber;
import appeng.util.Platform;
public class BlockInscriber extends AEBaseTileBlock
public class BlockInscriber extends AEBaseBlock
{
public BlockInscriber()
{
super( Material.iron );
super( BlockInscriber.class, Material.iron );
this.setTileEntity( TileInscriber.class );
this.setLightOpacity( 2 );
this.isFullSize = this.isOpaque = false;
@@ -27,7 +27,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.util.IOrientable;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockInterface;
import appeng.core.features.AEFeature;
@@ -36,13 +36,12 @@ import appeng.tile.misc.TileInterface;
import appeng.util.Platform;
public class BlockInterface extends AEBaseTileBlock
public class BlockInterface extends AEBaseBlock
{
public BlockInterface()
{
super( Material.iron );
super( BlockInterface.class, Material.iron );
this.setTileEntity( TileInterface.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -19,43 +19,25 @@
package appeng.block.misc;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.blocks.RenderQuartzTorch;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileLightDetector;
public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBlock, ICustomCollision
public class BlockLightDetector extends BlockQuartzTorch
{
public BlockLightDetector()
{
super( Material.circuits );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
super( BlockLightDetector.class );
this.setTileEntity( TileLightDetector.class );
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
}
@@ -89,82 +71,4 @@ public class BlockLightDetector extends AEBaseTileBlock implements IOrientableBl
{
// cancel out lightning
}
@Override
protected Class<? extends RenderQuartzTorch> getRenderer()
{
return RenderQuartzTorch.class;
}
@Override
public boolean isValidOrientation( World w, int x, int y, int z, ForgeDirection forward, ForgeDirection up )
{
return this.canPlaceAt( w, x, y, z, up.getOpposite() );
}
private boolean canPlaceAt( World w, int x, int y, int z, ForgeDirection dir )
{
return w.isSideSolid( x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, dir.getOpposite(), false );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
double xOff = -0.3 * up.offsetX;
double yOff = -0.3 * up.offsetY;
double zOff = -0.3 * up.offsetZ;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( xOff + 0.3, yOff + 0.3, zOff + 0.3, xOff + 0.7, yOff + 0.7, zOff + 0.7 ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e )
{/*
* double xOff = -0.15 * getUp().offsetX; double yOff = -0.15 * getUp().offsetY; double zOff = -0.15 *
* getUp().offsetZ; out.add( AxisAlignedBB.getBoundingBox( xOff + (double) x + 0.15, yOff + (double) y + 0.15, zOff
* + (double) z + 0.15,// ahh xOff + (double) x + 0.85, yOff + (double) y + 0.85, zOff + (double) z + 0.85 ) );
*/
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block id )
{
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
{
this.dropTorch( w, x, y, z );
}
}
private void dropTorch( World w, int x, int y, int z )
{
w.func_147480_a( x, y, z, true );
// w.destroyBlock( x, y, z, true );
w.markBlockForUpdate( x, y, z );
}
@Override
public boolean canPlaceBlockAt( World w, int x, int y, int z )
{
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
{
if( this.canPlaceAt( w, x, y, z, dir ) )
{
return true;
}
}
return false;
}
@Override
public boolean usesMetadata()
{
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 );
}
}
@@ -36,7 +36,7 @@ import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockPaint;
import appeng.core.features.AEFeature;
@@ -44,13 +44,12 @@ import appeng.tile.misc.TilePaint;
import appeng.util.Platform;
public class BlockPaint extends AEBaseTileBlock
public class BlockPaint extends AEBaseBlock
{
public BlockPaint()
{
super( new MaterialLiquid( MapColor.airColor ) );
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
this.setTileEntity( TilePaint.class );
this.setLightOpacity( 0 );
this.isFullSize = false;
@@ -72,13 +71,13 @@ public class BlockPaint extends AEBaseTileBlock
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool( World world, int x, int y, int z )
public AxisAlignedBB getCollisionBoundingBoxFromPool( World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_ )
{
return null;
}
@Override
public boolean canCollideCheck( int metadata, boolean isHoldingRightClick )
public boolean canCollideCheck( int p_149678_1_, boolean p_149678_2_ )
{
return false;
}
@@ -95,13 +94,13 @@ public class BlockPaint extends AEBaseTileBlock
}
@Override
public Item getItemDropped( int meta, Random random, int fortune )
public Item getItemDropped( int p_149650_1_, Random p_149650_2_, int p_149650_3_ )
{
return null;
}
@Override
public void dropBlockAsItemWithChance( World world, int x, int y, int z, int meta, float chance, int fortune )
public void dropBlockAsItemWithChance( World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_ )
{
}
@@ -111,7 +110,7 @@ public class BlockPaint extends AEBaseTileBlock
{
if( Platform.isServer() )
{
w.setBlock( x, y, z, Platform.AIR_BLOCK, 0, 3 );
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
}
}
@@ -25,30 +25,33 @@ import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockQuartzAccelerator;
import appeng.client.render.effects.LightningFX;
import appeng.core.AEConfig;
import appeng.core.CommonHelper;
import appeng.core.features.AEFeature;
import appeng.helpers.MetaRotation;
import appeng.tile.misc.TileQuartzGrowthAccelerator;
import appeng.util.Platform;
public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOrientableBlock
public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrientableBlock
{
public BlockQuartzGrowthAccelerator()
{
super( Material.rock );
super( BlockQuartzGrowthAccelerator.class, Material.rock );
this.setStepSound( Block.soundTypeMetal );
this.setTileEntity( TileQuartzGrowthAccelerator.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
@@ -69,15 +72,15 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
return;
}
TileQuartzGrowthAccelerator cga = this.getTileEntity( w, x, y, z );
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
if( cga != null && cga.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
if( tileQuartzGrowthAccelerator != null && tileQuartzGrowthAccelerator.hasPower && CommonHelper.proxy.shouldAddParticles( r ) )
{
double d0 = r.nextFloat() - 0.5F;
double d1 = r.nextFloat() - 0.5F;
ForgeDirection up = cga.getUp();
ForgeDirection forward = cga.getForward();
ForgeDirection up = tileQuartzGrowthAccelerator.getUp();
ForgeDirection forward = tileQuartzGrowthAccelerator.getForward();
ForgeDirection west = Platform.crossProduct( forward, up );
double rx = 0.5 + x;
@@ -141,14 +144,14 @@ public class BlockQuartzGrowthAccelerator extends AEBaseTileBlock implements IOr
}
@Override
/**
* TODO: remove with 1.8 or later
*
* @Deprecated no longer true, only kept to prevent missing blocks.
*/
@Deprecated
public boolean usesMetadata()
{
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 );
}
}
@@ -51,15 +51,19 @@ import appeng.helpers.MetaRotation;
public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, ICustomCollision
{
public BlockQuartzTorch()
{
super( Material.circuits );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
this( BlockQuartzTorch.class );
this.setLightLevel( 0.9375F );
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
}
protected BlockQuartzTorch( Class which )
{
super( which, Material.circuits );
this.setLightOpacity( 0 );
this.isFullSize = false;
this.isOpaque = false;
this.isFullSize = this.isOpaque = false;
}
@Override
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RendererSecurity;
import appeng.core.features.AEFeature;
@@ -35,13 +35,12 @@ import appeng.tile.misc.TileSecurity;
import appeng.util.Platform;
public class BlockSecurity extends AEBaseTileBlock
public class BlockSecurity extends AEBaseBlock
{
public BlockSecurity()
{
super( Material.iron );
super( BlockSecurity.class, Material.iron );
this.setTileEntity( TileSecurity.class );
this.setFeature( EnumSet.of( AEFeature.Security ) );
}
@@ -36,7 +36,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockSkyCompass;
import appeng.core.features.AEFeature;
@@ -44,12 +44,12 @@ import appeng.helpers.ICustomCollision;
import appeng.tile.misc.TileSkyCompass;
public class BlockSkyCompass extends AEBaseTileBlock implements ICustomCollision
public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
{
public BlockSkyCompass()
{
super( Material.iron );
super( BlockSkyCompass.class, Material.iron );
this.setTileEntity( TileSkyCompass.class );
this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0;
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -58,7 +58,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
public BlockTinyTNT()
{
super( Material.tnt );
super( BlockTinyTNT.class, Material.tnt );
this.setLightOpacity( 1 );
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
this.isFullSize = this.isOpaque = false;
@@ -66,7 +66,7 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
this.setHardness( 0F );
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance(), 16, 4, true );
EntityRegistry.registerModEntity( EntityTinyTNTPrimed.class, "EntityTinyTNTPrimed", EntityIds.TINY_TNT, AppEng.instance, 16, 4, true );
}
@Override
@@ -29,7 +29,7 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.texture.ExtraBlockTextures;
import appeng.core.AEConfig;
import appeng.core.features.AEFeature;
@@ -39,12 +39,12 @@ import appeng.tile.misc.TileVibrationChamber;
import appeng.util.Platform;
public final class BlockVibrationChamber extends AEBaseTileBlock
public final class BlockVibrationChamber extends AEBaseBlock
{
public BlockVibrationChamber()
{
super( Material.iron );
super( BlockVibrationChamber.class, Material.iron );
this.setTileEntity( TileVibrationChamber.class );
this.setHardness( 4.2F );
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -53,18 +53,17 @@ import appeng.api.parts.IPartHost;
import appeng.api.parts.PartItemStack;
import appeng.api.parts.SelectedPart;
import appeng.api.util.AEColor;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.BusRenderHelper;
import appeng.client.render.blocks.RendererCableBus;
import appeng.client.texture.ExtraBlockTextures;
import appeng.core.AEConfig;
import appeng.core.Api;
import appeng.core.AppEng;
import appeng.core.CommonHelper;
import appeng.core.features.AECableBusFeatureHandler;
import appeng.core.features.AEFeature;
import appeng.helpers.AEGlassMaterial;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IFMP;
import appeng.parts.ICableBusContainer;
@@ -78,7 +77,7 @@ import appeng.util.Platform;
@Interface( iface = "powercrystals.minefactoryreloaded.api.rednet.connectivity.IRedNetConnection", iname = "MFR" )
public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
{
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
@@ -92,12 +91,9 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
public BlockCableBus()
{
super( AEGlassMaterial.INSTANCE );
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
// this will actually be overwritten later through setupTile and the combined layers
this.setTileEntity( TileCableBus.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -130,7 +126,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
}
@Override
public int colorMultiplier( IBlockAccess world, int x, int y, int z )
public int colorMultiplier( IBlockAccess p_149720_1_, int p_149720_2_, int p_149720_3_, int p_149720_4_ )
{
return this.myColorMultiplier;
}
@@ -398,9 +394,9 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
{
out = ( (TileCableBus) te ).cb;
}
else if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.FMP ) )
else if( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
{
out = ( (IFMP) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.FMP ) ).getCableContainer( te );
out = ( (IFMP) AppEng.instance.getIntegration( IntegrationType.FMP ) ).getCableContainer( te );
}
return out == null ? NULL_CABLE_BUS : out;
@@ -468,7 +464,7 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
}
@Override
public <T extends AEBaseTile> T getTileEntity( IBlockAccess w, int x, int y, int z )
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
{
TileEntity te = w.getTileEntity( x, y, z );
@@ -485,18 +481,9 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
return null;
}
@Override
protected void setFeature( EnumSet<AEFeature> f )
{
final AECableBusFeatureHandler featureHandler = new AECableBusFeatureHandler( f, this, this.featureSubName );
this.setHandler( featureHandler );
}
public void setupTile()
{
noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() );
this.setTileEntity( noTesrTile );
GameRegistry.registerTileEntity( noTesrTile, "BlockCableBus" );
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() ) );
if( Platform.isClient() )
{
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
@@ -25,26 +25,26 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockController;
import appeng.core.features.AEFeature;
import appeng.tile.networking.TileController;
public class BlockController extends AEBaseTileBlock
public class BlockController extends AEBaseBlock
{
public BlockController()
{
super( Material.iron );
super( BlockController.class, Material.iron );
this.setTileEntity( TileController.class );
this.setHardness( 6 );
this.setFeature( EnumSet.of( AEFeature.Channels ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block neighborBlock )
public void onNeighborBlockChange( World w, int x, int y, int z, Block id_junk )
{
TileController tc = this.getTileEntity( w, x, y, z );
if( tc != null )
@@ -21,18 +21,18 @@ package appeng.block.networking;
import java.util.EnumSet;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.helpers.AEGlassMaterial;
import appeng.tile.networking.TileCreativeEnergyCell;
public class BlockCreativeEnergyCell extends AEBaseTileBlock
public class BlockCreativeEnergyCell extends AEBaseBlock
{
public BlockCreativeEnergyCell()
{
super( AEGlassMaterial.INSTANCE );
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
this.setTileEntity( TileCreativeEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Creative ) );
}
@@ -33,6 +33,7 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
public BlockDenseEnergyCell()
{
super( BlockDenseEnergyCell.class );
this.setTileEntity( TileDenseEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
}
@@ -23,17 +23,17 @@ import java.util.EnumSet;
import net.minecraft.block.material.Material;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.tile.networking.TileEnergyAcceptor;
public class BlockEnergyAcceptor extends AEBaseTileBlock
public class BlockEnergyAcceptor extends AEBaseBlock
{
public BlockEnergyAcceptor()
{
super( Material.iron );
super( BlockEnergyAcceptor.class, Material.iron );
this.setTileEntity( TileEnergyAcceptor.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
@@ -31,9 +31,9 @@ import net.minecraft.util.IIcon;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock;
import appeng.block.AEBaseItemBlock;
import appeng.block.AEBaseItemBlockChargeable;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockEnergyCube;
import appeng.client.texture.ExtraBlockTextures;
@@ -43,17 +43,21 @@ import appeng.tile.networking.TileEnergyCell;
import appeng.util.Platform;
public class BlockEnergyCell extends AEBaseTileBlock
public class BlockEnergyCell extends AEBaseBlock
{
public BlockEnergyCell()
{
super( AEGlassMaterial.INSTANCE );
this( BlockEnergyCell.class );
this.setTileEntity( TileEnergyCell.class );
this.setFeature( EnumSet.of( AEFeature.Core ) );
}
public BlockEnergyCell( Class c )
{
super( c, AEGlassMaterial.INSTANCE );
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
@@ -29,7 +29,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockWireless;
import appeng.core.features.AEFeature;
@@ -40,12 +40,12 @@ import appeng.tile.networking.TileWireless;
import appeng.util.Platform;
public class BlockWireless extends AEBaseTileBlock implements ICustomCollision
public class BlockWireless extends AEBaseBlock implements ICustomCollision
{
public BlockWireless()
{
super( AEGlassMaterial.INSTANCE );
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
this.setTileEntity( TileWireless.class );
this.setLightOpacity( 0 );
this.isFullSize = false;
@@ -1,77 +0,0 @@
/*
* 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.block.qnb;
import java.util.EnumSet;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
public abstract class BlockQuantumBase extends AEBaseTileBlock implements ICustomCollision
{
public BlockQuantumBase( Material mat )
{
super( mat );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
}
@Override
protected Class<? extends RenderQNB> getRenderer()
{
return RenderQNB.class;
}
}
@@ -20,9 +20,11 @@ package appeng.block.qnb;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
@@ -32,20 +34,31 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.block.AEBaseBlock;
import appeng.client.EffectType;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.CommonHelper;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.helpers.AEGlassMaterial;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
import appeng.util.Platform;
public class BlockQuantumLinkChamber extends BlockQuantumBase
public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomCollision
{
public BlockQuantumLinkChamber()
{
super( AEGlassMaterial.INSTANCE );
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 0 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
}
@Override
@@ -65,6 +78,22 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
}
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderQNB.class;
}
@Override
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
{
@@ -85,17 +114,29 @@ public class BlockQuantumLinkChamber extends BlockQuantumBase
return false;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
double onePixel = 2.0 / 16.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
double OnePx = 2.0 / 16.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
{
double onePixel = 2.0 / 16.0;
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
double OnePx = 2.0 / 16.0;
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
}
}
@@ -20,53 +20,94 @@ package appeng.block.qnb;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderQNB;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
import appeng.tile.qnb.TileQuantumBridge;
public class BlockQuantumRing extends BlockQuantumBase
public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
{
public BlockQuantumRing()
{
super( Material.iron );
super( BlockQuantumRing.class, Material.iron );
this.setTileEntity( TileQuantumBridge.class );
float shave = 2.0f / 16.0f;
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
this.setLightOpacity( 1 );
this.isFullSize = this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
}
@Override
public void onNeighborBlockChange( World w, int x, int y, int z, Block pointlessNumber )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.neighborUpdate();
}
}
@Override
protected Class<? extends BaseBlockRender> getRenderer()
{
return RenderQNB.class;
}
@Override
public void breakBlock( World w, int x, int y, int z, Block a, int b )
{
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null )
{
bridge.breakCluster();
}
super.breakBlock( w, x, y, z, a, b );
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean isVisual )
{
double onePixel = 2.0 / 16.0;
double OnePx = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null && bridge.isCorner() )
{
onePixel = 4.0 / 16.0;
OnePx = 4.0 / 16.0;
}
else if( bridge != null && bridge.isFormed() )
{
onePixel = 1.0 / 16.0;
OnePx = 1.0 / 16.0;
}
return Collections.singletonList( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
return Collections.singletonList( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
}
@Override
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
{
double onePixel = 2.0 / 16.0;
double OnePx = 2.0 / 16.0;
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
if( bridge != null && bridge.isCorner() )
{
onePixel = 4.0 / 16.0;
OnePx = 4.0 / 16.0;
}
else if( bridge != null && bridge.isFormed() )
{
onePixel = 1.0 / 16.0;
OnePx = 1.0 / 16.0;
}
out.add( AxisAlignedBB.getBoundingBox( onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel ) );
out.add( AxisAlignedBB.getBoundingBox( OnePx, OnePx, OnePx, 1.0 - OnePx, 1.0 - OnePx, 1.0 - OnePx ) );
}
}
@@ -31,7 +31,7 @@ public class BlockFluix extends AEDecorativeBlock
{
public BlockFluix()
{
super( Material.rock );
super( BlockFluix.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -32,7 +32,7 @@ public class BlockQuartz extends AEDecorativeBlock
public BlockQuartz()
{
super( Material.rock );
super( BlockQuartz.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -32,7 +32,7 @@ public class BlockQuartzChiseled extends AEDecorativeBlock
public BlockQuartzChiseled()
{
super( Material.rock );
super( BlockQuartzChiseled.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
}
@@ -36,9 +36,15 @@ import appeng.helpers.AEGlassMaterial;
public class BlockQuartzGlass extends AEBaseBlock
{
public BlockQuartzGlass()
{
super( Material.glass );
this( BlockQuartzGlass.class );
}
public BlockQuartzGlass( Class c )
{
super( c, Material.glass );
this.setLightOpacity( 0 );
this.isOpaque = false;
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
@@ -39,6 +39,7 @@ public class BlockQuartzLamp extends BlockQuartzGlass
public BlockQuartzLamp()
{
super( BlockQuartzLamp.class );
this.setLightLevel( 1.0f );
this.setBlockTextureName( "BlockQuartzGlass" );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
@@ -36,7 +36,7 @@ public class BlockQuartzPillar extends AEBaseBlock implements IOrientableBlock
public BlockQuartzPillar()
{
super( Material.rock );
super( BlockQuartzPillar.class, Material.rock );
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -29,6 +29,7 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.IBlockAccess;
@@ -40,37 +41,40 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import rblocks.api.RotatableBlockEnable;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.core.AppEng;
import appeng.core.WorldSettings;
import appeng.core.features.AEFeature;
import appeng.core.worlddata.WorldData;
import appeng.helpers.LocationRotation;
import appeng.helpers.NullRotation;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.IRB;
import appeng.util.Platform;
@RotatableBlockEnable
public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
{
private static final float BLOCK_RESISTANCE = 150.0f;
private static final double BREAK_SPEAK_SCALAR = 0.1;
private static final double BREAK_SPEAK_THRESHOLD = 7.0;
@SideOnly( Side.CLIENT )
private IIcon block;
IIcon Block;
@SideOnly( Side.CLIENT )
private IIcon brick;
IIcon Brick;
@SideOnly( Side.CLIENT )
private IIcon smallBrick;
IIcon SmallBrick;
public BlockSkyStone()
{
super( Material.rock );
super( BlockSkyStone.class, Material.rock );
this.setHardness( 50 );
this.hasSubtypes = true;
this.blockResistance = BLOCK_RESISTANCE;
this.blockResistance = 150.0f;
this.setHarvestLevel( "pickaxe", 3, 0 );
this.setFeature( EnumSet.of( AEFeature.Core ) );
@@ -78,21 +82,21 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
}
@SubscribeEvent
public void breakFaster( PlayerEvent.BreakSpeed event )
public void breakFaster( PlayerEvent.BreakSpeed Ev )
{
if( event.block == this && event.entityPlayer != null )
if( Ev.block == this && Ev.entityPlayer != null )
{
ItemStack is = event.entityPlayer.inventory.getCurrentItem();
ItemStack is = Ev.entityPlayer.inventory.getCurrentItem();
int level = -1;
if( is != null && is.getItem() != null )
if( is != null )
{
level = is.getItem().getHarvestLevel( is, "pickaxe" );
}
if( event.metadata > 0 || level >= 3 || event.originalSpeed > BREAK_SPEAK_THRESHOLD )
if( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
{
event.newSpeed /= BREAK_SPEAK_SCALAR;
Ev.newSpeed /= 0.1;
}
}
}
@@ -118,10 +122,16 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
super.onBlockAdded( w, x, y, z );
if( Platform.isServer() )
{
WorldData.instance().compassData().service().updateArea( w, x, y, z );
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
}
}
// use AE2's renderer, no rotatable blocks.
int getRealRenderType()
{
return this.getRenderType();
}
@Override
public boolean usesMetadata()
{
@@ -131,6 +141,19 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
@Override
public IOrientable getOrientable( final IBlockAccess w, final int x, final int y, final int z )
{
if( AppEng.instance.isIntegrationEnabled( IntegrationType.RB ) )
{
TileEntity te = w.getTileEntity( x, y, z );
if( te != null )
{
IOrientable out = ( (IRB) AppEng.instance.getIntegration( IntegrationType.RB ) ).getOrientable( te );
if( out != null )
{
return out;
}
}
}
if( w.getBlockMetadata( x, y, z ) == 0 )
{
return new LocationRotation( w, x, y, z );
@@ -165,9 +188,9 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
public void registerBlockIcons( IIconRegister ir )
{
super.registerBlockIcons( ir );
this.block = ir.registerIcon( this.getTextureName() + ".Block" );
this.brick = ir.registerIcon( this.getTextureName() + ".Brick" );
this.smallBrick = ir.registerIcon( this.getTextureName() + ".SmallBrick" );
this.Block = ir.registerIcon( this.getTextureName() + ".Block" );
this.Brick = ir.registerIcon( this.getTextureName() + ".Brick" );
this.SmallBrick = ir.registerIcon( this.getTextureName() + ".SmallBrick" );
}
@Override
@@ -176,15 +199,15 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
{
if( metadata == 1 )
{
return this.block;
return this.Block;
}
if( metadata == 2 )
{
return this.brick;
return this.Brick;
}
if( metadata == 3 )
{
return this.smallBrick;
return this.SmallBrick;
}
return super.getIcon( direction, metadata );
}
@@ -207,12 +230,12 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
}
@Override
public void breakBlock( World w, int x, int y, int z, Block b, int metadata )
public void breakBlock( World w, int x, int y, int z, Block b, int WTF )
{
super.breakBlock( w, x, y, z, b, metadata );
super.breakBlock( w, x, y, z, b, WTF );
if( Platform.isServer() )
{
WorldData.instance().compassData().service().updateArea( w, x, y, z );
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
}
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -21,7 +21,6 @@ package appeng.block.solids;
import java.util.EnumSet;
import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.block.material.Material;
@@ -30,6 +29,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
import appeng.api.AEApi;
import appeng.api.exceptions.MissingDefinition;
@@ -47,7 +47,12 @@ public class OreQuartz extends AEBaseBlock
public OreQuartz()
{
super( Material.rock );
this( OreQuartz.class );
}
public OreQuartz( Class<? extends OreQuartz> self )
{
super( self, Material.rock );
this.setHardness( 3.0F );
this.setResistance( 5.0F );
this.boostBrightnessLow = 0;
@@ -62,6 +67,12 @@ public class OreQuartz extends AEBaseBlock
return RenderQuartzOre.class;
}
@Override
public void postInit()
{
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( this ) );
}
@Override
public int getMixedBrightnessForBlock( IBlockAccess par1iBlockAccess, int par2, int par3, int par4 )
{
@@ -20,7 +20,6 @@ package appeng.block.solids;
import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.client.Minecraft;
@@ -43,6 +42,7 @@ public class OreQuartzCharged extends OreQuartz
public OreQuartzCharged()
{
super( OreQuartzCharged.class );
this.setBoostBrightnessLow( 2 );
this.setBoostBrightnessHigh( 5 );
}
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
@Override
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();
}
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
@SideOnly( Side.CLIENT )
public void randomDisplayTick( World w, int x, int y, int z, Random r )
{
if( !AEConfig.instance.enableEffects )
if ( !AEConfig.instance.enableEffects )
{
return;
}
@@ -49,7 +49,7 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
public BlockMatrixFrame()
{
super( Material.anvil );
super( BlockMatrixFrame.class, Material.anvil );
this.setResistance( 6000000.0F );
this.setBlockUnbreakable();
this.setLightOpacity( 0 );
@@ -27,19 +27,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.spatial.TileSpatialIOPort;
import appeng.util.Platform;
public class BlockSpatialIOPort extends AEBaseTileBlock
public class BlockSpatialIOPort extends AEBaseBlock
{
public BlockSpatialIOPort()
{
super( Material.iron );
super( BlockSpatialIOPort.class, Material.iron );
this.setTileEntity( TileSpatialIOPort.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
}
@@ -25,7 +25,7 @@ import net.minecraft.block.Block;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderSpatialPylon;
import appeng.core.features.AEFeature;
@@ -33,12 +33,12 @@ import appeng.helpers.AEGlassMaterial;
import appeng.tile.spatial.TileSpatialPylon;
public class BlockSpatialPylon extends AEBaseTileBlock
public class BlockSpatialPylon extends AEBaseBlock
{
public BlockSpatialPylon()
{
super( AEGlassMaterial.INSTANCE );
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
this.setTileEntity( TileSpatialPylon.class );
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
}
@@ -29,7 +29,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import appeng.api.AEApi;
import appeng.api.storage.ICellHandler;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderMEChest;
import appeng.core.features.AEFeature;
@@ -39,12 +39,12 @@ import appeng.tile.storage.TileChest;
import appeng.util.Platform;
public class BlockChest extends AEBaseTileBlock
public class BlockChest extends AEBaseBlock
{
public BlockChest()
{
super( Material.iron );
super( BlockChest.class, Material.iron );
this.setTileEntity( TileChest.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
}
@@ -26,7 +26,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderDrive;
import appeng.core.features.AEFeature;
@@ -35,12 +35,12 @@ import appeng.tile.storage.TileDrive;
import appeng.util.Platform;
public class BlockDrive extends AEBaseTileBlock
public class BlockDrive extends AEBaseBlock
{
public BlockDrive()
{
super( Material.iron );
super( BlockDrive.class, Material.iron );
this.setTileEntity( TileDrive.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
}
@@ -27,19 +27,19 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge;
import appeng.tile.storage.TileIOPort;
import appeng.util.Platform;
public class BlockIOPort extends AEBaseTileBlock
public class BlockIOPort extends AEBaseBlock
{
public BlockIOPort()
{
super( Material.iron );
super( BlockIOPort.class, Material.iron );
this.setTileEntity( TileIOPort.class );
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
}
@@ -42,7 +42,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.AEApi;
import appeng.block.AEBaseTileBlock;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderBlockSkyChest;
import appeng.core.features.AEFeature;
@@ -52,12 +52,12 @@ import appeng.tile.storage.TileSkyChest;
import appeng.util.Platform;
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
{
public BlockSkyChest()
{
super( Material.rock );
super( BlockSkyChest.class, Material.rock );
this.setTileEntity( TileSkyChest.class );
this.isOpaque = this.isFullSize = false;
this.lightOpacity = 0;
@@ -148,11 +148,11 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
o = sk.getUp();
}
double offsetX = o.offsetX == 0 ? 0.06 : 0.0;
double offsetY = o.offsetY == 0 ? 0.06 : 0.0;
double offsetZ = o.offsetZ == 0 ? 0.06 : 0.0;
double X = o.offsetX == 0 ? 0.06 : 0.0;
double Y = o.offsetY == 0 ? 0.06 : 0.0;
double Z = o.offsetZ == 0 ? 0.06 : 0.0;
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, offsetX - o.offsetX * sc ), Math.max( 0.0, offsetY - o.offsetY * sc ), Math.max( 0.0, offsetZ - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - offsetX ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - offsetY ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - offsetZ ) - o.offsetZ * sc ) ) );
return Collections.singletonList( AxisAlignedBB.getBoundingBox( Math.max( 0.0, X - o.offsetX * sc ), Math.max( 0.0, Y - o.offsetY * sc ), Math.max( 0.0, Z - o.offsetZ * sc ), Math.min( 1.0, ( 1.0 - X ) - o.offsetX * sc ), Math.min( 1.0, ( 1.0 - Y ) - o.offsetY * sc ), Math.min( 1.0, ( 1.0 - Z ) - o.offsetZ * sc ) ) );
}
@Override
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -84,6 +84,9 @@ import appeng.server.ServerHelper;
import appeng.transformer.MissingCoreMod;
import appeng.util.Platform;
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.ENTITY;
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
public class ClientHelper extends ServerHelper
{
@@ -298,10 +301,10 @@ public class ClientHelper extends ServerHelper
GL11.glRotatef( 30.0f, 0.0f, 1.0f, 0.0f );
}
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, IItemRenderer.ItemRenderType.ENTITY );
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer( itemstack, ENTITY );
if( customRenderer != null && !( itemstack.getItem() instanceof ItemBlock ) )
{
if( customRenderer.shouldUseRenderHelper( IItemRenderer.ItemRenderType.ENTITY, itemstack, IItemRenderer.ItemRendererHelper.BLOCK_3D ) )
if( customRenderer.shouldUseRenderHelper( ENTITY, itemstack, BLOCK_3D ) )
{
GL11.glTranslatef( 0, -0.04F, 0 );
GL11.glScalef( 0.7f, 0.7f, 0.7f );
+16 -16
View File
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -30,9 +30,6 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
@@ -52,6 +49,9 @@ import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import com.google.common.base.Joiner;
import com.google.common.base.Stopwatch;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.gui.widgets.GuiScrollbar;
import appeng.client.gui.widgets.ITooltip;
@@ -72,11 +72,11 @@ import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction;
import appeng.core.sync.packets.PacketSwapSlots;
import appeng.helpers.InventoryAction;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.integration.abstraction.INEI;
@@ -156,14 +156,14 @@ public abstract class AEBaseGui extends GuiContainer
}
@Override
public void drawScreen( int mouseX, int mouseY, float btn )
public void drawScreen( int mouse_x, int mouse_y, float btn )
{
super.drawScreen( mouseX, mouseY, btn );
super.drawScreen( mouse_x, mouse_y, btn );
boolean hasClicked = Mouse.isButtonDown( 0 );
if( hasClicked && this.myScrollBar != null )
{
this.myScrollBar.click( this, mouseX - this.guiLeft, mouseY - this.guiTop );
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
}
for( Object c : this.buttonList )
@@ -174,9 +174,9 @@ public abstract class AEBaseGui extends GuiContainer
int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition;
int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition;
if( x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible() )
if( x < mouse_x && x + tooltip.getWidth() > mouse_x && tooltip.isVisible() )
{
if( y < mouseY && y + tooltip.getHeight() > mouseY )
if( y < mouse_y && y + tooltip.getHeight() > mouse_y )
{
if( y < 15 )
{
@@ -194,14 +194,14 @@ public abstract class AEBaseGui extends GuiContainer
}
}
public void drawTooltip( int par2, int par3, int forceWidth, String message )
public void drawTooltip( int par2, int par3, int forceWidth, String Msg )
{
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
GL11.glDisable( GL12.GL_RESCALE_NORMAL );
RenderHelper.disableStandardItemLighting();
GL11.glDisable( GL11.GL_LIGHTING );
GL11.glDisable( GL11.GL_DEPTH_TEST );
String[] var4 = message.split( "\n" );
String[] var4 = Msg.split( "\n" );
if( var4.length > 0 )
{
@@ -590,7 +590,7 @@ public abstract class AEBaseGui extends GuiContainer
}
@Override
protected boolean checkHotbarKeys( int keyCode )
protected boolean checkHotbarKeys( int p_146983_1_ )
{
Slot theSlot;
@@ -607,7 +607,7 @@ public abstract class AEBaseGui extends GuiContainer
{
for( int j = 0; j < 9; ++j )
{
if( keyCode == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
if( p_146983_1_ == this.mc.gameSettings.keyBindsHotbar[j].getKeyCode() )
{
final List<Slot> slots = this.getInventorySlots();
for( Slot s : slots )
@@ -895,9 +895,9 @@ public abstract class AEBaseGui extends GuiContainer
private RenderItem setItemRender( RenderItem item )
{
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI ) )
if( AppEng.instance.isIntegrationEnabled( IntegrationType.NEI ) )
{
return ( (INEI) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.NEI ) ).setItemRender( item );
return ( (INEI) AppEng.instance.getIntegration( IntegrationType.NEI ) ).setItemRender( item );
}
else
{
@@ -26,8 +26,6 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import com.google.common.base.Joiner;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
@@ -35,6 +33,8 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import com.google.common.base.Joiner;
import appeng.api.AEApi;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
@@ -131,7 +131,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
@Override
public void drawScreen( int mouseX, int mouseY, float btn )
public void drawScreen( int mouse_x, int mouse_y, float btn )
{
this.updateCPUButtonText();
@@ -152,9 +152,9 @@ public class GuiCraftConfirm extends AEBaseGui
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY;
if( minX < mouseX && minX + 67 > mouseX )
if( minX < mouse_x && minX + 67 > mouse_x )
{
if( minY < mouseY && minY + offY - 2 > mouseY )
if( minY < mouse_y && minY + offY - 2 > mouse_y )
{
this.tooltip = z;
break;
@@ -170,7 +170,7 @@ public class GuiCraftConfirm extends AEBaseGui
}
}
super.drawScreen( mouseX, mouseY, btn );
super.drawScreen( mouse_x, mouse_y, btn );
}
private void updateCPUButtonText()
@@ -24,17 +24,15 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.google.common.base.Joiner;
import org.apache.commons.lang3.time.DurationFormatUtils;
import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import com.google.common.base.Joiner;
import appeng.api.AEApi;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
@@ -52,45 +50,20 @@ import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.util.Platform;
import appeng.util.ReadableNumberConverter;
public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
private final static int GUI_HEIGHT = 184;
private final static int GUI_WIDTH = 238;
private final static int DISPLAYED_ROWS = 6;
final int rows = 6;
private final static int TEXT_COLOR = 0x404040;
private final static int BACKGROUND_ALPHA = 0x5A000000;
IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
private final static int SECTION_LENGTH = 67;
private final static int SCROLLBAR_TOP = 19;
private final static int SCROLLBAR_LEFT = 218;
private final static int SCROLLBAR_HEIGHT = 137;
private final static int CANCEL_LEFT_OFFSET = 163;
private final static int CANCEL_TOP_OFFSET = 25;
private final static int CANCEL_HEIGHT = 20;
private final static int CANCEL_WIDTH = 50;
private final static int TITLE_TOP_OFFSET = 7;
private final static int TITLE_LEFT_OFFSET = 8;
private final static int ITEMSTACK_LEFT_OFFSET = 9;
private final static int ITEMSTACK_TOP_OFFSET = 22;
private final ContainerCraftingCPU craftingCpu;
private IItemList<IAEItemStack> storage = AEApi.instance().storage().createItemList();
private IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
private IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
private List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
private GuiButton cancel;
private int tooltip = -1;
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiButton cancel;
int tooltip = -1;
public GuiCraftingCPU( InventoryPlayer inventoryPlayer, Object te )
{
@@ -100,9 +73,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
protected GuiCraftingCPU( ContainerCraftingCPU container )
{
super( container );
this.craftingCpu = container;
this.ySize = GUI_HEIGHT;
this.xSize = GUI_WIDTH;
this.ySize = 184;
this.xSize = 238;
this.myScrollBar = new GuiScrollbar();
}
@@ -137,7 +109,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
super.initGui();
this.setScrollBar();
this.cancel = new GuiButton( 0, this.guiLeft + CANCEL_LEFT_OFFSET, this.guiTop + this.ySize - CANCEL_TOP_OFFSET, CANCEL_WIDTH, CANCEL_HEIGHT, GuiText.Cancel.getLocal() );
this.cancel = new GuiButton( 0, this.guiLeft + 163, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
this.buttonList.add( this.cancel );
}
@@ -145,21 +117,21 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
{
int size = this.visual.size();
this.myScrollBar.setTop( SCROLLBAR_TOP ).setLeft( SCROLLBAR_LEFT ).setHeight( SCROLLBAR_HEIGHT );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - DISPLAYED_ROWS, 1 );
this.myScrollBar.setTop( 19 ).setLeft( 218 ).setHeight( 137 );
this.myScrollBar.setRange( 0, ( size + 2 ) / 3 - this.rows, 1 );
}
@Override
public void drawScreen( int mouseX, int mouseY, float btn )
public void drawScreen( int mouse_x, int mouse_y, float btn )
{
this.cancel.enabled = !this.visual.isEmpty();
int x = 0;
int y = 0;
final int gx = ( this.width - this.xSize ) / 2;
final int gy = ( this.height - this.ySize ) / 2;
final int offY = 23;
int gx = ( this.width - this.xSize ) / 2;
int gy = ( this.height - this.ySize ) / 2;
int offY = 23;
this.tooltip = -1;
@@ -168,9 +140,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int minX = gx + 9 + x * 67;
int minY = gy + 22 + y * offY;
if( minX < mouseX && minX + 67 > mouseX )
if( minX < mouse_x && minX + 67 > mouse_x )
{
if( minY < mouseY && minY + offY - 2 > mouseY )
if( minY < mouse_y && minY + offY - 2 > mouse_y )
{
this.tooltip = z;
break;
@@ -186,28 +158,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouseX, mouseY, btn );
super.drawScreen( mouse_x, mouse_y, btn );
}
@Override
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
{
final ReadableNumberConverter converter = ReadableNumberConverter.INSTANCE;
String title = this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() );
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.CraftingStatus.getLocal() ), 8, 7, 4210752 );
if( this.craftingCpu.eta > 0 && !this.visual.isEmpty() )
{
final long etaInMilliseconds = TimeUnit.MILLISECONDS.convert( this.craftingCpu.eta, TimeUnit.NANOSECONDS );
final String etaTimeText = DurationFormatUtils.formatDuration( etaInMilliseconds, GuiText.ETAFormat.getLocal() );
title += " - " + etaTimeText;
}
this.fontRendererObj.drawString( title, TITLE_LEFT_OFFSET, TITLE_TOP_OFFSET, TEXT_COLOR );
int sectionLength = 67;
int x = 0;
int y = 0;
final int viewStart = this.myScrollBar.getCurrentScroll() * 3;
final int viewEnd = viewStart + 3 * 6;
int xo = 9;
int yo = 22;
int viewStart = this.myScrollBar.getCurrentScroll() * 3;
int viewEnd = viewStart + 3 * 6;
String dspToolTip = "";
List<String> lineList = new LinkedList<String>();
@@ -224,9 +190,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
GL11.glPushMatrix();
GL11.glScaled( 0.5, 0.5, 0.5 );
final IAEItemStack stored = this.storage.findPrecise( refStack );
final IAEItemStack activeStack = this.active.findPrecise( refStack );
final IAEItemStack pendingStack = this.pending.findPrecise( refStack );
IAEItemStack stored = this.storage.findPrecise( refStack );
IAEItemStack activeStack = this.active.findPrecise( refStack );
IAEItemStack pendingStack = this.pending.findPrecise( refStack );
int lines = 0;
boolean active = false;
@@ -249,10 +215,10 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( AEConfig.instance.useColoredCraftingStatus && ( active || scheduled ) )
{
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | BACKGROUND_ALPHA;
int startX = ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET ) * 2;
int startY = ( ( y * offY + ITEMSTACK_TOP_OFFSET ) - 3 ) * 2;
drawRect( startX, startY, startX + ( SECTION_LENGTH * 2 ), startY + ( offY * 2 ) - 2, bgColor );
int bgColor = ( active ? AEColor.Green.blackVariant : AEColor.Yellow.blackVariant ) | 0x5A000000;
int startX = ( x * ( 1 + sectionLength ) + xo ) * 2;
int startY = ( ( y * offY + yo ) - 3 ) * 2;
drawRect( startX, startY, startX + ( sectionLength * 2 ), startY + ( offY * 2 ) - 2, bgColor );
}
int negY = ( ( lines - 1 ) * 5 ) / 2;
@@ -260,9 +226,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( stored != null && stored.getStackSize() > 0 )
{
final String str = GuiText.Stored.getLocal() + ": " + converter.toWideReadableForm( stored.getStackSize() );
String str = Long.toString( stored.getStackSize() );
if( stored.getStackSize() >= 10000 )
{
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
}
if( stored.getStackSize() >= 10000000 )
{
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
}
str = GuiText.Stored.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
{
@@ -274,10 +250,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( activeStack != null && activeStack.getStackSize() > 0 )
{
final String str = GuiText.Crafting.getLocal() + ": " + converter.toWideReadableForm( activeStack.getStackSize() );
final int w = 4 + this.fontRendererObj.getStringWidth( str );
String str = Long.toString( activeStack.getStackSize() );
if( activeStack.getStackSize() >= 10000 )
{
str = Long.toString( activeStack.getStackSize() / 1000 ) + 'k';
}
if( activeStack.getStackSize() >= 10000000 )
{
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
}
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
str = GuiText.Crafting.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
{
@@ -289,10 +274,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
if( pendingStack != null && pendingStack.getStackSize() > 0 )
{
final String str = GuiText.Scheduled.getLocal() + ": " + converter.toWideReadableForm( pendingStack.getStackSize() );
final int w = 4 + this.fontRendererObj.getStringWidth( str );
String str = Long.toString( pendingStack.getStackSize() );
if( pendingStack.getStackSize() >= 10000 )
{
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
}
if( pendingStack.getStackSize() >= 10000000 )
{
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
}
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + ITEMSTACK_TOP_OFFSET + 6 - negY + downY ) * 2, TEXT_COLOR );
str = GuiText.Scheduled.getLocal() + ": " + str;
int w = 4 + this.fontRendererObj.getStringWidth( str );
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
if( this.tooltip == z - viewStart )
{
@@ -301,8 +295,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
GL11.glPopMatrix();
int posX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 19;
int posY = y * offY + ITEMSTACK_TOP_OFFSET;
int posX = x * ( 1 + sectionLength ) + xo + sectionLength - 19;
int posY = y * offY + yo;
ItemStack is = refStack.copy().getItemStack();
@@ -315,8 +309,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
}
toolPosX = x * ( 1 + SECTION_LENGTH ) + ITEMSTACK_LEFT_OFFSET + SECTION_LENGTH - 8;
toolPosY = y * offY + ITEMSTACK_TOP_OFFSET;
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
toolPosY = y * offY + yo;
}
this.drawItem( posX, posY, is );
@@ -418,9 +412,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private long getTotal( IAEItemStack is )
{
final IAEItemStack a = this.storage.findPrecise( is );
final IAEItemStack b = this.active.findPrecise( is );
final IAEItemStack c = this.pending.findPrecise( is );
IAEItemStack a = this.storage.findPrecise( is );
IAEItemStack b = this.active.findPrecise( is );
IAEItemStack c = this.pending.findPrecise( is );
long total = 0;
@@ -444,8 +438,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
private void deleteVisualStack( IAEItemStack l )
{
final Iterator<IAEItemStack> i = this.visual.iterator();
Iterator<IAEItemStack> i = this.visual.iterator();
while( i.hasNext() )
{
IAEItemStack o = i.next();
@@ -467,9 +460,8 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
}
}
final IAEItemStack stack = l.copy();
IAEItemStack stack = l.copy();
this.visual.add( stack );
return stack;
}
@@ -28,8 +28,6 @@ import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import com.google.common.collect.HashMultimap;
import org.lwjgl.opengl.GL11;
import net.minecraft.entity.player.InventoryPlayer;
@@ -37,6 +35,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import com.google.common.collect.HashMultimap;
import appeng.api.AEApi;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiScrollbar;
@@ -45,7 +45,7 @@ import appeng.client.me.ClientDCInternalInv;
import appeng.client.me.SlotDisconnected;
import appeng.container.implementations.ContainerInterfaceTerminal;
import appeng.core.localization.GuiText;
import appeng.parts.reporting.PartInterfaceTerminal;
import appeng.parts.reporting.PartMonitor;
import appeng.util.Platform;
@@ -67,7 +67,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
private boolean refreshList = false;
private MEGuiTextField searchField;
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartInterfaceTerminal te )
public GuiInterfaceTerminal( InventoryPlayer inventoryPlayer, PartMonitor te )
{
super( new ContainerInterfaceTerminal( inventoryPlayer, te ) );
this.myScrollBar = new GuiScrollbar();
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -54,15 +54,15 @@ import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotFakeCraftingMatrix;
import appeng.core.AEConfig;
import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketSwitchGuis;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.parts.reporting.AbstractPartTerminal;
import appeng.parts.reporting.PartTerminal;
import appeng.tile.misc.TileSecurity;
import appeng.util.IConfigManagerHost;
import appeng.util.Platform;
@@ -139,7 +139,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
this.myName = GuiText.Chest;
}
else if( te instanceof AbstractPartTerminal )
else if( te instanceof PartTerminal )
{
this.myName = GuiText.Terminal;
}
@@ -224,7 +224,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.maxRows = this.getMaxRows();
this.perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
boolean hasNEI = IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.NEI );
boolean hasNEI = AppEng.instance.isIntegrationEnabled( IntegrationType.NEI );
int NEI = hasNEI ? 0 : 0;
int top = hasNEI ? 22 : 0;
@@ -333,7 +333,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
{
if( s instanceof AppEngSlot )
{
if( ( (Slot) s ).xDisplayPosition < 197 )
if( ( (AppEngSlot) s ).xDisplayPosition < 197 )
{
this.repositionSlot( (AppEngSlot) s );
}
@@ -89,7 +89,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
@Override
public void drawScreen( int mouseX, int mouseY, float btn )
public void drawScreen( int mouse_x, int mouse_y, float btn )
{
int x = 0;
int y = 0;
@@ -104,9 +104,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
int minX = gx + 14 + x * 31;
int minY = gy + 41 + y * 18;
if( minX < mouseX && minX + 28 > mouseX )
if( minX < mouse_x && minX + 28 > mouse_x )
{
if( minY < mouseY && minY + 20 > mouseY )
if( minY < mouse_y && minY + 20 > mouse_y )
{
this.tooltip = z;
break;
@@ -122,7 +122,7 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
}
}
super.drawScreen( mouseX, mouseY, btn );
super.drawScreen( mouse_x, mouse_y, btn );
}
@Override
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -23,8 +23,8 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.client.gui.AEBaseGui;
import appeng.container.implementations.ContainerSkyChest;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
import appeng.tile.storage.TileSkyChest;
@@ -55,6 +55,6 @@ public class GuiSkyChest extends AEBaseGui
@Override
protected boolean enableSpaceClicking()
{
return !IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.InvTweaks );
return !AppEng.instance.isIntegrationEnabled( IntegrationType.InvTweaks );
}
}
@@ -26,7 +26,6 @@ import net.minecraft.entity.player.InventoryPlayer;
import appeng.api.config.FuzzyMode;
import appeng.api.config.RedstoneMode;
import appeng.api.config.SchedulingMode;
import appeng.api.config.Settings;
import appeng.api.config.Upgrades;
import appeng.api.config.YesNo;
@@ -37,7 +36,6 @@ import appeng.container.implementations.ContainerUpgradeable;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton;
import appeng.parts.automation.PartExportBus;
import appeng.parts.automation.PartImportBus;
@@ -50,7 +48,6 @@ public class GuiUpgradeable extends AEBaseGui
GuiImgButton redstoneMode;
GuiImgButton fuzzyMode;
GuiImgButton craftMode;
GuiImgButton schedulingMode;
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
{
@@ -84,12 +81,10 @@ public class GuiUpgradeable extends AEBaseGui
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.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.redstoneMode );
this.buttonList.add( this.fuzzyMode );
this.buttonList.add( this.schedulingMode );
}
@Override
@@ -112,11 +107,6 @@ public class GuiUpgradeable extends AEBaseGui
{
this.craftMode.set( this.cvb.cMode );
}
if( this.schedulingMode != null )
{
this.schedulingMode.set( this.cvb.schedulingMode );
}
}
@Override
@@ -150,10 +140,6 @@ public class GuiUpgradeable extends AEBaseGui
{
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()
@@ -192,10 +178,5 @@ public class GuiUpgradeable extends AEBaseGui
{
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
}
if( btn == this.schedulingMode )
{
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.schedulingMode.getSetting(), backwards ) );
}
}
}
@@ -39,7 +39,6 @@ import appeng.api.config.OperationMode;
import appeng.api.config.PowerUnits;
import appeng.api.config.RedstoneMode;
import appeng.api.config.RelativeDirection;
import appeng.api.config.SchedulingMode;
import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
@@ -159,10 +158,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
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 * 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 );
}
}
@@ -394,6 +389,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
}
}
private static class ButtonAppearance
{
public int index;
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -28,17 +28,17 @@ public class GuiNumberBox extends GuiTextField
final Class type;
public GuiNumberBox( FontRenderer fontRenderer, int x, int y, int width, int height, Class type )
public GuiNumberBox( FontRenderer p_i1032_1_, int p_i1032_2_, int p_i1032_3_, int p_i1032_4_, int p_i1032_5_, Class type )
{
super( fontRenderer, x, y, width, height );
super( p_i1032_1_, p_i1032_2_, p_i1032_3_, p_i1032_4_, p_i1032_5_ );
this.type = type;
}
@Override
public void writeText( String selectedText )
public void writeText( String p_146191_1_ )
{
String original = this.getText();
super.writeText( selectedText );
super.writeText( p_146191_1_ );
try
{
@@ -38,20 +38,20 @@ public class GuiProgressBar extends GuiButton implements ITooltip
private final String titleName;
private String fullMsg;
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir )
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir )
{
this( source, texture, posX, posY, u, y, width, height, dir, null );
this( source, texture, posX, posY, u, y, _width, _height, dir, null );
}
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int width, int height, Direction dir, String title )
public GuiProgressBar( IProgressProvider source, String texture, int posX, int posY, int u, int y, int _width, int _height, Direction dir, String title )
{
super( posX, posY, width, "" );
super( posX, posY, _width, "" );
this.source = source;
this.xPosition = posX;
this.yPosition = posY;
this.texture = new ResourceLocation( "appliedenergistics2", "textures/" + texture );
this.width = width;
this.height = height;
this.width = _width;
this.height = _height;
this.fill_u = u;
this.fill_v = y;
this.layout = dir;
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
/**
* Using itemstack as an icon
*
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param x x pos of button
* @param y y pos of button
* @param ico used icon
* @param message mouse over message
* @param ir renderer
* @param ir renderer
*/
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.
*
* @param fontRenderer renderer for the strings
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
* @param xPos absolute left position
* @param yPos absolute top position
* @param width absolute width
* @param height absolute height
*/
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
{
+1 -1
View File
@@ -200,7 +200,7 @@ public class ItemRepo
{
for( Object lp : Platform.getTooltip( is ) )
{
if( lp instanceof String && m.matcher( (CharSequence) lp ).find() )
if( lp instanceof String && m.matcher( (String) lp ).find() )
{
this.view.add( is );
notDone = false;
@@ -21,12 +21,12 @@ package appeng.client.render;
import java.nio.FloatBuffer;
import java.util.EnumSet;
import javax.annotation.Nullable;
import org.lwjgl.BufferUtils;
import org.lwjgl.opengl.GL11;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.RenderHelper;
@@ -46,6 +46,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import appeng.api.util.IOrientable;
import appeng.api.util.IOrientableBlock;
import appeng.block.AEBaseBlock;
import appeng.client.texture.ExtraBlockTextures;
import appeng.tile.AEBaseTile;
@@ -53,7 +54,7 @@ import appeng.util.Platform;
@SideOnly( Side.CLIENT )
public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
public class BaseBlockRender
{
private static final int ORIENTATION_BITS = 7;
private static final int FLIP_H_BIT = 8;
@@ -69,10 +70,10 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
this( false, 20 );
}
public BaseBlockRender( boolean enableTESR, double renderDistance )
public BaseBlockRender( boolean enableTESR, double tileEntitySpecialRendererRange )
{
this.hasTESR = enableTESR;
this.renderDistance = renderDistance;
this.renderDistance = tileEntitySpecialRendererRange;
setOriMap();
}
@@ -280,7 +281,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return this.renderDistance;
}
public void renderInventory( B block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] data )
public void renderInventory( AEBaseBlock block, ItemStack item, RenderBlocks renderer, ItemRenderType type, Object[] data )
{
Tessellator tess = Tessellator.instance;
@@ -328,7 +329,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ORIENTATION_MAP[a][b][c];
}
public void renderInvBlock( EnumSet<ForgeDirection> sides, B block, ItemStack item, Tessellator tess, int color, RenderBlocks renderer )
public void renderInvBlock( EnumSet<ForgeDirection> sides, AEBaseBlock block, ItemStack item, Tessellator tess, int color, RenderBlocks renderer )
{
int meta = 0;
if( block != null && block.hasSubtypes() && item != null )
@@ -403,7 +404,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ExtraBlockTextures.getMissing();
}
public boolean renderInWorld( B 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 )
{
this.preRenderInWorld( block, world, x, y, z, renderer );
@@ -413,7 +414,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return o;
}
public void preRenderInWorld( B block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
public void preRenderInWorld( AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer )
{
ForgeDirection forward = ForgeDirection.SOUTH;
ForgeDirection up = ForgeDirection.UP;
@@ -442,9 +443,17 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@Nullable
public IOrientable getOrientable( B block, IBlockAccess w, int x, int y, int z )
public IOrientable getOrientable( AEBaseBlock block, IBlockAccess w, int x, int y, int z )
{
return block.getOrientable( w, x, y, z );
if( block.hasBlockTileEntity() )
{
return (AEBaseTile) block.getTileEntity( w, x, y, z );
}
else if( block instanceof IOrientableBlock )
{
return ( (IOrientableBlock) block ).getOrientable( w, x, y, z );
}
return null;
}
protected void setInvRenderBounds( RenderBlocks renderer, int i, int j, int k, int l, int m, int n )
@@ -502,7 +511,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
protected void renderCutoutFace( B block, IIcon ico, int x, int y, int z, RenderBlocks renderer, ForgeDirection orientation, float edgeThickness )
protected void renderCutoutFace( Block block, IIcon ico, int x, int y, int z, RenderBlocks renderer, ForgeDirection orientation, float edgeThickness )
{
Tessellator tess = Tessellator.instance;
@@ -614,7 +623,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
}
@SideOnly( Side.CLIENT )
protected void renderFace( int x, int y, int z, B block, IIcon ico, RenderBlocks renderer, ForgeDirection orientation )
protected void renderFace( int x, int y, int z, Block block, IIcon ico, RenderBlocks renderer, ForgeDirection orientation )
{
switch( orientation )
{
@@ -679,7 +688,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
return ( 16.0 - uv ) / 16.0;
}
public void renderTile( B block, T tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
public void renderTile( AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float f, RenderBlocks renderer )
{
ForgeDirection forward = ForgeDirection.SOUTH;
ForgeDirection up = ForgeDirection.UP;
@@ -754,6 +763,7 @@ public class BaseBlockRender<B extends AEBaseBlock, T extends AEBaseTile>
GL11.glTranslated( x + 0.5, y + 0.5, z + 0.5 );
GL11.glMultMatrix( this.rotMat );
GL11.glTranslated( -0.5, -0.5, -0.5 );
GL11.glCullFace( GL11.GL_FRONT );
}
else
{
@@ -49,31 +49,31 @@ public class BlockRenderInfo
this.rendererInstance = inst;
}
public void updateIcons( FlippableIcon bottom, FlippableIcon top, FlippableIcon north, FlippableIcon south, FlippableIcon east, FlippableIcon west )
public void updateIcons( FlippableIcon Bottom, FlippableIcon Top, FlippableIcon North, FlippableIcon South, FlippableIcon East, FlippableIcon West )
{
this.topIcon = top;
this.bottomIcon = bottom;
this.southIcon = south;
this.northIcon = north;
this.eastIcon = east;
this.westIcon = west;
this.topIcon = Top;
this.bottomIcon = Bottom;
this.southIcon = South;
this.northIcon = North;
this.eastIcon = East;
this.westIcon = West;
}
public void setTemporaryRenderIcon( IIcon icon )
public void setTemporaryRenderIcon( IIcon IIcon )
{
if( icon == null )
if( IIcon == null )
{
this.useTmp = false;
}
else
{
this.useTmp = true;
this.tmpTopIcon.setOriginal( icon );
this.tmpBottomIcon.setOriginal( icon );
this.tmpSouthIcon.setOriginal( icon );
this.tmpNorthIcon.setOriginal( icon );
this.tmpEastIcon.setOriginal( icon );
this.tmpWestIcon.setOriginal( icon );
this.tmpTopIcon.setOriginal( IIcon );
this.tmpBottomIcon.setOriginal( IIcon );
this.tmpSouthIcon.setOriginal( IIcon );
this.tmpNorthIcon.setOriginal( IIcon );
this.tmpEastIcon.setOriginal( IIcon );
this.tmpWestIcon.setOriginal( IIcon );
}
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -20,12 +20,8 @@ package appeng.client.render;
import java.util.EnumSet;
import javax.annotation.Nullable;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@@ -35,6 +31,9 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import appeng.api.AEApi;
import appeng.api.exceptions.MissingDefinition;
import appeng.api.parts.IBoxProvider;
@@ -45,7 +44,6 @@ import appeng.block.AEBaseBlock;
import appeng.block.networking.BlockCableBus;
import appeng.core.AEConfig;
import appeng.core.features.AEFeature;
import appeng.tile.AEBaseTile;
@SideOnly( Side.CLIENT )
@@ -77,7 +75,7 @@ public final class BusRenderHelper implements IPartRenderHelper
{
this.bbc = new BoundBoxCalculator( this );
this.noAlphaPass = !AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass );
this.bbr = new BaseBlockRender<AEBaseBlock, AEBaseTile>();
this.bbr = new BaseBlockRender();
this.renderingForPass = 0;
this.currentPass = 0;
this.itemsRendered = 0;
@@ -232,6 +230,7 @@ public final class BusRenderHelper implements IPartRenderHelper
}
}
private static final class BaseBlockTransformFunction implements Function<Block, AEBaseBlock>
{
@Nullable
@@ -240,7 +239,7 @@ public final class BusRenderHelper implements IPartRenderHelper
{
if( input instanceof AEBaseBlock )
{
return( (AEBaseBlock) input );
return ( (AEBaseBlock) input );
}
return null;
@@ -375,16 +374,16 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void setTexture( IIcon down, IIcon up, IIcon north, IIcon south, IIcon west, IIcon east )
public void setTexture( IIcon Down, IIcon Up, IIcon North, IIcon South, IIcon West, IIcon East )
{
IIcon[] list = new IIcon[6];
list[0] = down;
list[1] = up;
list[2] = north;
list[3] = south;
list[4] = west;
list[5] = east;
list[0] = Down;
list[1] = Up;
list[2] = North;
list[3] = South;
list[4] = West;
list[5] = East;
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
@@ -457,10 +456,10 @@ public final class BusRenderHelper implements IPartRenderHelper
}
@Override
public void renderInventoryFace( IIcon icon, ForgeDirection face, RenderBlocks renderer )
public void renderInventoryFace( IIcon IIcon, ForgeDirection face, RenderBlocks renderer )
{
renderer.setRenderBounds( this.minX / 16.0, this.minY / 16.0, this.minZ / 16.0, this.maxX / 16.0, this.maxY / 16.0, this.maxZ / 16.0 );
this.setTexture( icon );
this.setTexture( IIcon );
for( AEBaseBlock baseBlock : this.maybeBaseBlock.asSet() )
{
@@ -569,7 +568,7 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
for( Block block : this.maybeBlock.asSet() )
{
this.bbr.renderCutoutFace( block, ico, x, y, z, renderer, face, edgeThickness );
}
@@ -610,7 +609,7 @@ public final class BusRenderHelper implements IPartRenderHelper
break;
}
for( AEBaseBlock block : this.maybeBaseBlock.asSet() )
for( Block block : this.maybeBlock.asSet() )
{
this.bbr.renderFace( x, y, z, block, ico, renderer, face );
}
@@ -1,6 +1,6 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
* 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
@@ -21,7 +21,6 @@ package appeng.client.render;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
import org.lwjgl.opengl.GL11;
@@ -165,7 +164,6 @@ public class BusRenderer implements IItemRenderer
GL11.glPopMatrix();
}
@Nullable
public IPart getRenderer( ItemStack is, IPartItem c )
{
int id = ( Item.getIdFromItem( is.getItem() ) << Platform.DEF_OFFSET ) | is.getItemDamage();

Some files were not shown because too many files have changed in this diff Show More