Compare commits
110 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d9f362270b | |||
| 37aef15a02 | |||
| 2d8728f0e1 | |||
| 3498a0902b | |||
| bb4b6719fe | |||
| 34f78a7ce4 | |||
| 064acc21ee | |||
| deeb67f07d | |||
| 2eeaa80b59 | |||
| 1710894edc | |||
| 7cb485aa48 | |||
| 65d0ae9290 | |||
| 1baed48b0a | |||
| da6b31cdb1 | |||
| 013c8d882c | |||
| 503d325021 | |||
| 875214c166 | |||
| 2eec5309ac | |||
| a9ec31d72f | |||
| e392ecd08d | |||
| 03f9436ef9 | |||
| 8917a331eb | |||
| 8fbb317f6e | |||
| f15561c4dc | |||
| ee431b3269 | |||
| ba97dacfdd | |||
| ce6a2e8487 | |||
| 64ed05a1b4 | |||
| 23aa8fd72d | |||
| 332ea089e3 | |||
| 106003ebf9 | |||
| 8271597394 | |||
| 9210069d9b | |||
| f364359905 | |||
| fb618b939f | |||
| 43a47f8971 | |||
| e85acf2bee | |||
| bbde2443e1 | |||
| ad2f63ba0d | |||
| ee977720ca | |||
| ca953f4596 | |||
| 2adc055536 | |||
| 399934ac2b | |||
| 9451106c81 | |||
| 8e75de8fb9 | |||
| eca598516e | |||
| 2c5a54c210 | |||
| 1ac2ab0c10 | |||
| 199b17b9c6 | |||
| f582c8081b | |||
| 77d66b1817 | |||
| df370396b1 | |||
| ceeb84a439 | |||
| 9af6b50347 | |||
| d151313253 | |||
| 6d935cc8ae | |||
| 1396dbf600 | |||
| 8087a43df5 | |||
| c2cd395ca1 | |||
| a6e2975677 | |||
| 3783ae8619 | |||
| be17616836 | |||
| 36c72d641f | |||
| f878a7598d | |||
| 071ae6d680 | |||
| cc29230ce5 | |||
| b282e5d968 | |||
| 3410db7b45 | |||
| 800c30e91c | |||
| 817163dbf6 | |||
| d164e279ef | |||
| 4f9b8db6fc | |||
| b58c92ebb6 | |||
| 2667b8eac6 | |||
| 235fad439d | |||
| fcea444041 | |||
| 80f56d4359 | |||
| f14bfa7d53 | |||
| a7d55ee520 | |||
| 7382897e8e | |||
| aac2b598ea | |||
| 0f31cd43d2 | |||
| 788de6d432 | |||
| 04a6a683bc | |||
| 25e433f7bd | |||
| fbc44f47c8 | |||
| 06bca227d0 | |||
| 8321a5fe1c | |||
| 1bb8de3570 | |||
| 8666937117 | |||
| eaf57bedf6 | |||
| a30ef4679c | |||
| 0ee2ca72ac | |||
| 881bb919da | |||
| 5ecd68d5b6 | |||
| e2d0e5d424 | |||
| e3bf7d63c0 | |||
| 3fedcf273b | |||
| 8042dbb3db | |||
| e7e397c412 | |||
| ecc472a692 | |||
| 9790d9fd93 | |||
| f3f89344b4 | |||
| bac94b67b8 | |||
| ba1afcca38 | |||
| bb1c341c95 | |||
| 2ef04f1303 | |||
| 632d048ee2 | |||
| adea6b3dec | |||
| 5416ea2365 |
+1
-1
@@ -7,7 +7,7 @@
|
|||||||
!gradlew
|
!gradlew
|
||||||
!gradlew.bat
|
!gradlew.bat
|
||||||
!build.gradle
|
!build.gradle
|
||||||
!build.properties
|
!gradle.properties
|
||||||
|
|
||||||
# include markdowns
|
# include markdowns
|
||||||
!README.md
|
!README.md
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
<!--[](https://github.com/AppliedEnergistics/Applied-Energistics-2/releases) -->
|
||||||
|
[](http://ci.tsr.me/viewType.html?buildTypeId=AppliedEnergistics_AutoHeadBuild&tab=buildTypeStatusDiv)
|
||||||
|
|
||||||
# Applied Energistics 2
|
# Applied Energistics 2
|
||||||
|
|
||||||
## Table of Contents
|
## Table of Contents
|
||||||
@@ -26,12 +29,17 @@ A Mod about Matter, Energy and using them to conquer the world..
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Applied Energistics 2 API is (c) 2013 - 2014 AlgorithmX2 and licensed under MIT.
|
* Applied Energistics 2 API
|
||||||
|
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||||
Applied Energistics 2 is (c) 2013 - 2014 AlgorithmX2 and licensed under LGPL v3.
|
- 
|
||||||
See the LICENSE.txt for details or go to http://www.gnu.org/licenses/lgpl-3.0.txt for more information.
|
* Applied Energistics 2
|
||||||
|
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||||
Textures and Models are licensed under [Creative Commons, Attribution-NonCommercial-ShareAlike 3.0]( https://creativecommons.org/licenses/by-nc-sa/3.0/).
|
- [](https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/rv2/LICENSE)
|
||||||
|
* Textures and Models
|
||||||
|
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||||
|
- [](https://creativecommons.org/licenses/by-nc-sa/3.0/)
|
||||||
|
* Text and Translations
|
||||||
|
- 
|
||||||
|
|
||||||
## Downloads
|
## Downloads
|
||||||
|
|
||||||
@@ -103,7 +111,7 @@ Getting Started
|
|||||||
6. Push to your fork `git push`
|
6. Push to your fork `git push`
|
||||||
7. Create a Pull-Request on GitHub
|
7. Create a Pull-Request on GitHub
|
||||||
8. Wait for review
|
8. Wait for review
|
||||||
9. Suqash commits for cleaner history
|
9. Squash commits for cleaner history
|
||||||
|
|
||||||
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
|
If you are only doing single file pull requests, GitHub supports using a quick way without the need of cloning your fork. Also read up about [synching](https://help.github.com/articles/syncing-a-fork) if you plan to contribute on regular basis.
|
||||||
|
|
||||||
@@ -137,10 +145,6 @@ An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
|
|||||||
|
|
||||||
Files must be encoded as UTF-8.
|
Files must be encoded as UTF-8.
|
||||||
|
|
||||||
### License
|
|
||||||
|
|
||||||
All Text and Translations submitted here can be used for any purpose, and may be re-distributed or used without any limitations.
|
|
||||||
|
|
||||||
### New Translations
|
### New Translations
|
||||||
|
|
||||||
You can provide any additional languages by creating a new file with the [appropriate language code](http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm).
|
You can provide any additional languages by creating a new file with the [appropriate language code](http://download1.parallels.com/SiteBuilder/Windows/docs/3.2/en_US/sitebulder-3.2-win-sdk-localization-pack-creation-guide/30801.htm).
|
||||||
|
|||||||
+10
-7
@@ -18,13 +18,15 @@
|
|||||||
|
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
apply from: 'gradle/scripts/propertyloader.gradle'
|
|
||||||
apply from: 'gradle/scripts/dependencies.gradle'
|
apply from: 'gradle/scripts/dependencies.gradle'
|
||||||
apply from: 'gradle/scripts/artifacts.gradle'
|
apply from: 'gradle/scripts/artifacts.gradle'
|
||||||
apply from: 'gradle/scripts/autoinstallruntime.gradle'
|
apply from: 'gradle/scripts/autoinstallruntime.gradle'
|
||||||
|
apply from: 'gradle/scripts/integration.gradle'
|
||||||
|
apply from: 'gradle/scripts/optional.gradle'
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
@@ -50,9 +52,9 @@ configurations.all {
|
|||||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||||
targetCompatibility = JavaVersion.VERSION_1_6
|
targetCompatibility = JavaVersion.VERSION_1_6
|
||||||
|
|
||||||
version = config.version + "-" + config.aechannel + "-" + config.build
|
version = aeversion + "-" + aechannel + "-" + aebuild
|
||||||
group = config.group
|
group = aegroup
|
||||||
archivesBaseName = config.archivesBaseName
|
archivesBaseName = aebasename
|
||||||
|
|
||||||
// If TeamCity is running this build, lets set the version info
|
// If TeamCity is running this build, lets set the version info
|
||||||
if (hasProperty("teamcity")) {
|
if (hasProperty("teamcity")) {
|
||||||
@@ -77,11 +79,11 @@ jar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
version = config.minecraft_version + "-" + config.forge_version
|
version = minecraft_version + "-" + forge_version
|
||||||
|
|
||||||
replaceIn "AEConfig.java"
|
replaceIn "AEConfig.java"
|
||||||
replace "@version@", project.version
|
replace "@version@", project.version
|
||||||
replace "@aechannel@", config.aechannel
|
replace "@aechannel@", aechannel
|
||||||
|
|
||||||
// used when launching minecraft in dev env
|
// used when launching minecraft in dev env
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
@@ -110,6 +112,7 @@ processResources {
|
|||||||
// replace stuff in mcmod.info, nothing else
|
// replace stuff in mcmod.info, nothing else
|
||||||
from(sourceSets.main.resources.srcDirs) {
|
from(sourceSets.main.resources.srcDirs) {
|
||||||
include 'mcmod.info'
|
include 'mcmod.info'
|
||||||
expand 'version': project.version, 'mcversion': config.minecraft_version
|
expand 'version': project.version, 'mcversion': minecraft_version
|
||||||
|
include 'pack.mcmeta'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
version=rv2
|
aeversion=rv2
|
||||||
aechannel=beta
|
aechannel=beta
|
||||||
build=0
|
aebuild=0
|
||||||
group=appeng
|
aegroup=appeng
|
||||||
archivesBaseName=appliedenergistics2
|
aebasename=appliedenergistics2
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# Versions #
|
# Versions #
|
||||||
@@ -11,9 +11,24 @@ minecraft_version=1.7.10
|
|||||||
forge_version=10.13.2.1291
|
forge_version=10.13.2.1291
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# APIs used for development #
|
# Installable #
|
||||||
|
#########################################################
|
||||||
|
waila_version=1.5.10
|
||||||
|
jabba_version=1.2.1a
|
||||||
|
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
|
||||||
|
#cofhcore_version=3.0.2-270
|
||||||
|
#texpansion_version=4.0.0-176
|
||||||
|
#tfoundation_version=1.0.0-82
|
||||||
|
betterstorage_version=0.11.3.123.20
|
||||||
|
invtweaks_version=1.58
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# Provided APIs #
|
||||||
#########################################################
|
#########################################################
|
||||||
cb_minecraft_version=1.7.10
|
|
||||||
fmp_version=1.1.1.324
|
fmp_version=1.1.1.324
|
||||||
code_chicken_lib_version=1.1.3.127
|
code_chicken_lib_version=1.1.3.127
|
||||||
code_chicken_core_version=1.0.4.35
|
code_chicken_core_version=1.0.4.35
|
||||||
@@ -21,21 +36,22 @@ nei_version=1.0.4.90
|
|||||||
bc_version=6.4.6
|
bc_version=6.4.6
|
||||||
|
|
||||||
#########################################################
|
#########################################################
|
||||||
# API Stubs #
|
# Self Compiled APIs #
|
||||||
|
#########################################################
|
||||||
|
mekansim_version=8.0.1.198
|
||||||
|
rotarycraft_version=V5c
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################
|
||||||
|
# Self Compiled API Stubs #
|
||||||
# Note: Do not edit these version numbers as they are #
|
# Note: Do not edit these version numbers as they are #
|
||||||
# not the version of the mod, but stub code for AE2 to #
|
# not the version of the mod, but stub code for AE2 to #
|
||||||
# compile #
|
# compile #
|
||||||
#########################################################
|
#########################################################
|
||||||
api_betterstorage_version=1
|
|
||||||
api_coloredlightscore_version=1
|
api_coloredlightscore_version=1
|
||||||
api_craftguide_version=1
|
api_craftguide_version=1
|
||||||
api_ic2_version=1
|
|
||||||
api_immibis_version=1
|
api_immibis_version=1
|
||||||
api_invtweaks_version=1
|
|
||||||
api_mekansim_version=1.7.10-8.0.1.198
|
|
||||||
api_mfr_version=1
|
api_mfr_version=1
|
||||||
api_railcraft_version=1
|
api_railcraft_version=1
|
||||||
api_rblocks_version=1
|
api_rblocks_version=1
|
||||||
api_rf_version=2
|
api_rf_version=2
|
||||||
api_rotarycraft_version=V5c
|
|
||||||
api_waila_version=1.5.10_1.7.10
|
|
||||||
@@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
mavenLocal()
|
||||||
maven {
|
maven {
|
||||||
name 'CB Maven FS'
|
name "ChickenBones"
|
||||||
url "http://chickenbones.net/maven/"
|
url "http://chickenbones.net/maven/"
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name "Waila Mobius Repo"
|
name "Mobius"
|
||||||
url "http://mobiusstrip.eu/maven"
|
url "http://mobiusstrip.eu/maven"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,31 +34,86 @@ repositories {
|
|||||||
name "FireBall API Depot"
|
name "FireBall API Depot"
|
||||||
url "http://dl.tsr.me/artifactory/libs-release-local"
|
url "http://dl.tsr.me/artifactory/libs-release-local"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
name = "Player"
|
||||||
|
url = "http://maven.ic2.player.to/"
|
||||||
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
name = "Tterrag"
|
||||||
|
url = "http://maven.tterrag.com/"
|
||||||
|
}
|
||||||
|
|
||||||
|
maven {
|
||||||
|
name = "RX14 Proxy"
|
||||||
|
url = "http://mvn.rx14.co.uk/repo/"
|
||||||
|
}
|
||||||
|
// 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"
|
||||||
|
// artifactPattern "http://addons.cursecdn.com/files/2212/893/[module]-[revision].[ext]"
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// ivy {
|
||||||
|
// name = "CoFHCore"
|
||||||
|
// artifactPattern "http://addons.cursecdn.com/files/2212/895/[module]-[revision].[ext]"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ivy {
|
||||||
|
// name = "ThermalExpansion"
|
||||||
|
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/446/[module]-[revision].[ext]"
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ivy {
|
||||||
|
// name = "ThermalFoundation"
|
||||||
|
// artifactPattern "http://addons.curse.cursecdn.com/files/2212/444/[module]-[revision].[ext]"
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
configurations {
|
||||||
|
mods
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
// installable
|
||||||
|
mods "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||||
|
mods "mcp.mobius.jabba:Jabba:${jabba_version}_${minecraft_version}:dev"
|
||||||
|
mods "codechicken:EnderStorage:${minecraft_version}-${enderstorage_version}:dev"
|
||||||
|
mods "codechicken:Translocator:${minecraft_version}-${translocator_version}:dev"
|
||||||
|
mods "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:dev"
|
||||||
|
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 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'
|
||||||
|
// mods name: 'ThermalFoundation', version: "[${minecraft_version}]${tfoundation_version}-dev", ext: 'jar'
|
||||||
|
|
||||||
compile "codechicken:ForgeMultipart:${config.cb_minecraft_version}-${config.fmp_version}:dev"
|
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
|
||||||
compile "codechicken:CodeChickenLib:${config.cb_minecraft_version}-${config.code_chicken_lib_version}:dev"
|
compile "codechicken:CodeChickenLib:${minecraft_version}-${code_chicken_lib_version}:dev"
|
||||||
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
|
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
||||||
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
|
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||||
|
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
||||||
|
|
||||||
compile "com.mod-buildcraft:buildcraft:${config.bc_version}:dev"
|
// provided APIs
|
||||||
|
compile "net.industrial-craft:industrialcraft-2:${ic2_version}-experimental:api"
|
||||||
|
compile "net.mcft.copy.betterstorage:BetterStorage:${minecraft_version}-${betterstorage_version}:api"
|
||||||
|
|
||||||
// self compiled APIs
|
// self compiled APIs
|
||||||
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
compile "appeng:Waila:${waila_version}_${minecraft_version}:api"
|
||||||
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
compile "appeng:RotaryCraft:${rotarycraft_version}:api"
|
||||||
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
compile "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
|
||||||
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
compile "appeng:InventoryTweaks:${invtweaks_version}:api"
|
||||||
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
|
||||||
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
// self compiled stubs
|
||||||
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
compile(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
|
||||||
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
compile(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
|
||||||
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
|
||||||
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
|
||||||
compile "appeng:Waila:${config.api_waila_version}:api"
|
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
|
||||||
compile "appeng:RotaryCraft:${config.api_rotarycraft_version}:api"
|
compile(group: 'api', name: 'rblocks', version: "${api_rblocks_version}")
|
||||||
compile "appeng:mekanism:${config.api_mekansim_version}:api"
|
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
|
||||||
|
|
||||||
testCompile "junit:junit:4.11"
|
testCompile "junit:junit:4.11"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
apply plugin: 'idea'
|
||||||
|
|
||||||
|
idea {
|
||||||
|
module {
|
||||||
|
inheritOutputDirs = true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
task wrapper(type: Wrapper) {
|
||||||
|
gradleVersion = "2.3"
|
||||||
|
}
|
||||||
|
|
||||||
|
// WAILA
|
||||||
|
task installWaila(type: Copy, dependsOn: "deinstallWaila") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*Waila*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallWaila(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Waila*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// JABBA
|
||||||
|
task installJabba(type: Copy, dependsOn: "deinstallJabba") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*Jabba*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallJabba(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Jabba*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENDER STORAGE
|
||||||
|
task installEnderStorage(type: Copy, dependsOn: "deinstallEnderStorage") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*EnderStorage*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallEnderStorage(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderStorage*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// TRANSLOCATOR
|
||||||
|
task installTranslocator(type: Copy, dependsOn: "deinstallTranslocator") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*Translocator*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallTranslocator(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Translocator*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// INDUSTRIALCRAFT
|
||||||
|
task installIC2(type: Copy, dependsOn: "deinstallIC2") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*industrialcraft*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallIC2(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// ENDER IO
|
||||||
|
task installEnderIO(type: Copy, dependsOn: "deinstallEnderIO") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*EnderIO*dev.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallEnderIO(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*EnderIO*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// TE
|
||||||
|
//task installTE(type: Copy, dependsOn: "deinstallTE") {
|
||||||
|
// from { configurations.mods }
|
||||||
|
// include "**/*CoFHLib*.jar"
|
||||||
|
// include "**/*CoFHCore*.jar"
|
||||||
|
// include "**/*ThermalFoundation*.jar"
|
||||||
|
// include "**/*ThermalExpansion*.jar"
|
||||||
|
//
|
||||||
|
// into file(minecraft.runDir + "/mods")
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//task deinstallTE(type: Delete) {
|
||||||
|
// delete fileTree(dir: minecraft.runDir + "/mods", includes: ["*CoFHLib*.jar", "*CoFHCore*.jar", "*ThermalFoundation*.jar", "*ThermalExpansion*.jar"])
|
||||||
|
//}
|
||||||
|
|
||||||
|
// INV TWEAKS
|
||||||
|
task installInvTweaks(type: Copy, dependsOn: "deinstallInvTweaks") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*InventoryTweaks*dev*.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallInvTweaks(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*InventoryTweaks*.jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
// BETTER STORAGE
|
||||||
|
task installBetterStorage(type: Copy, dependsOn: "deinstallBetterStorage") {
|
||||||
|
from { configurations.mods }
|
||||||
|
include "**/*BetterStorage*deobf*.jar"
|
||||||
|
into file(minecraft.runDir + "/mods")
|
||||||
|
}
|
||||||
|
|
||||||
|
task deinstallBetterStorage(type: Delete) {
|
||||||
|
delete fileTree(dir: minecraft.runDir + "/mods", include: "*BetterStorage*.jar")
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
// define the properties file
|
|
||||||
ext.configFile = file "build.properties"
|
|
||||||
|
|
||||||
configFile.withReader {
|
|
||||||
// read config. it shall from now on be referenced as simply config or as project.config
|
|
||||||
def prop = new Properties()
|
|
||||||
prop.load(it)
|
|
||||||
project.ext.config = new ConfigSlurper().parse prop
|
|
||||||
}
|
|
||||||
Vendored
BIN
Binary file not shown.
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
#Sat Sep 13 21:58:22 CEST 2014
|
#Sat May 02 19:28:20 CEST 2015
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ public enum FuzzyMode
|
|||||||
// Note that percentage damaged, is the inverse of percentage durability.
|
// Note that percentage damaged, is the inverse of percentage durability.
|
||||||
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
|
IGNORE_ALL( -1 ), PERCENT_99( 0 ), PERCENT_75( 25 ), PERCENT_50( 50 ), PERCENT_25( 75 );
|
||||||
|
|
||||||
final public float breakPoint;
|
public final float breakPoint;
|
||||||
final public float percentage;
|
public final float percentage;
|
||||||
|
|
||||||
FuzzyMode( float p )
|
FuzzyMode( float p )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public enum PowerUnits
|
|||||||
/**
|
/**
|
||||||
* unlocalized name for the power unit.
|
* unlocalized name for the power unit.
|
||||||
*/
|
*/
|
||||||
final public String unlocalizedName;
|
public final String unlocalizedName;
|
||||||
/**
|
/**
|
||||||
* please do not edit this value, it is set when AE loads its config files.
|
* please do not edit this value, it is set when AE loads its config files.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public enum SecurityPermissions
|
|||||||
*/
|
*/
|
||||||
SECURITY;
|
SECURITY;
|
||||||
|
|
||||||
final private String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
|
private final String unlocalizedName = "gui.appliedenergistics2.security." + this.name().toLowerCase();
|
||||||
|
|
||||||
public String getUnlocalizedName()
|
public String getUnlocalizedName()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ package appeng.api.config;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
|
||||||
public enum Settings
|
public enum Settings
|
||||||
@@ -55,16 +56,19 @@ public enum Settings
|
|||||||
|
|
||||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
||||||
|
|
||||||
private final EnumSet values;
|
private final EnumSet<? extends Enum<?>> values;
|
||||||
|
|
||||||
Settings( EnumSet set )
|
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
|
||||||
{
|
{
|
||||||
if( set == null || set.isEmpty() )
|
if ( possibleOptions.isEmpty() )
|
||||||
throw new RuntimeException( "Invalid configuration." );
|
{
|
||||||
this.values = set;
|
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
|
||||||
|
}
|
||||||
|
|
||||||
|
this.values = possibleOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnumSet getPossibleValues()
|
public EnumSet<? extends Enum<?>> getPossibleValues()
|
||||||
{
|
{
|
||||||
return this.values;
|
return this.values;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package appeng.api.definitions;
|
|||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
import com.google.common.base.Optional;
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
@@ -18,4 +19,16 @@ public interface IBlockDefinition extends IItemDefinition
|
|||||||
* @return the {@link ItemBlock} implementation if applicable
|
* @return the {@link ItemBlock} implementation if applicable
|
||||||
*/
|
*/
|
||||||
Optional<ItemBlock> maybeItemBlock();
|
Optional<ItemBlock> maybeItemBlock();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare Block with world.
|
||||||
|
*
|
||||||
|
* @param world world of block
|
||||||
|
* @param x x pos of block
|
||||||
|
* @param y y pos of block
|
||||||
|
* @param z z pos of block
|
||||||
|
*
|
||||||
|
* @return if the block is placed in the world at the specific location.
|
||||||
|
*/
|
||||||
|
boolean isSameAs( IBlockAccess world, int x, int y, int z );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,10 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface to compare a definition with an itemstack or a block
|
* Interface to compare a definition with an itemstack or a block
|
||||||
|
*
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv2
|
||||||
|
* @since rv2
|
||||||
*/
|
*/
|
||||||
public interface IComparableDefinition
|
public interface IComparableDefinition
|
||||||
{
|
{
|
||||||
@@ -28,6 +32,9 @@ public interface IComparableDefinition
|
|||||||
* @param z z pos of block
|
* @param z z pos of block
|
||||||
*
|
*
|
||||||
* @return if the block is placed in the world at the specific location.
|
* @return if the block is placed in the world at the specific location.
|
||||||
|
*
|
||||||
|
* @deprecated moved to {@link IBlockDefinition}. Is removed in the next major release rv3
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
boolean isSameAs( IBlockAccess world, int x, int y, int z );
|
boolean isSameAs( IBlockAccess world, int x, int y, int z );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ import appeng.api.features.ILocatable;
|
|||||||
public class LocatableEventAnnounce extends Event
|
public class LocatableEventAnnounce extends Event
|
||||||
{
|
{
|
||||||
|
|
||||||
final public ILocatable target;
|
public final ILocatable target;
|
||||||
final public LocatableEvent change;
|
public final LocatableEvent change;
|
||||||
|
|
||||||
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev )
|
public LocatableEventAnnounce( ILocatable o, LocatableEvent ev )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import com.google.common.base.Optional;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registration Records for {@link IInscriberRegistry}
|
||||||
|
*
|
||||||
|
* You have to pay attention though, that recipes are not mirrored,
|
||||||
|
* where the top and bottom slots are switching places.
|
||||||
|
*
|
||||||
|
* This is applied on runtime.
|
||||||
|
*
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv2
|
||||||
|
* @since rv2
|
||||||
|
*/
|
||||||
|
public interface IInscriberRecipe
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* the current inputs
|
||||||
|
*
|
||||||
|
* @return inputs the inscriber will accept
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
List<ItemStack> getInputs();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the current output
|
||||||
|
*
|
||||||
|
* @return output that the recipe will produce
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
ItemStack getOutput();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the top optional
|
||||||
|
*
|
||||||
|
* @return item which is used top
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
Optional<ItemStack> getTopOptional();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gets the bottom optional
|
||||||
|
*
|
||||||
|
* @return item which is used bottom
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
Optional<ItemStack> getBottomOptional();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* type of inscriber process
|
||||||
|
*
|
||||||
|
* @return type of process the inscriber is doing
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
InscriberProcessType getProcessType();
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Builder for an inscriber recipe
|
||||||
|
*
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv2
|
||||||
|
* @since rv2
|
||||||
|
*/
|
||||||
|
public interface IInscriberRecipeBuilder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Creates an inscriber recipe with inputs.
|
||||||
|
* Needs to be invoked.
|
||||||
|
*
|
||||||
|
* @param inputs new inputs for the recipe
|
||||||
|
*
|
||||||
|
* @return currently used builder
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder withInputs( @Nonnull Collection<ItemStack> inputs );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an inscriber recipe with output.
|
||||||
|
* Needs to be invoked.
|
||||||
|
*
|
||||||
|
* @param output new output for the recipe
|
||||||
|
*
|
||||||
|
* @return currently used builder
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder withOutput( @Nonnull ItemStack output );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an inscriber recipe with top.
|
||||||
|
* Either this or bot needs to be invoked.
|
||||||
|
*
|
||||||
|
* @param topOptional new top for the recipe
|
||||||
|
*
|
||||||
|
* @return currently used builder
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder withTopOptional( @Nonnull ItemStack topOptional );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an inscriber recipe with bot.
|
||||||
|
* Either this or top needs to be invoked.
|
||||||
|
*
|
||||||
|
* @param bottomOptional new bot for the recipe
|
||||||
|
*
|
||||||
|
* @return currently used builder
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder withBottomOptional( @Nonnull ItemStack bottomOptional );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an inscriber recipe with type.
|
||||||
|
* Needs to be invoked.
|
||||||
|
*
|
||||||
|
* @param type new type for the recipe
|
||||||
|
*
|
||||||
|
* @return currently used builder
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder withProcessType( @Nonnull InscriberProcessType type );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Finalizes the process of making the recipe.
|
||||||
|
* Needs to be invoked to fetch inscriber recipe.
|
||||||
|
*
|
||||||
|
* @return legal inscriber recipe
|
||||||
|
*
|
||||||
|
* @throws IllegalStateException when input is not defined
|
||||||
|
* @throws IllegalStateException when input has no size
|
||||||
|
* @throws IllegalStateException when output is not defined
|
||||||
|
* @throws IllegalStateException when both optionals are not defined
|
||||||
|
* @throws IllegalStateException when process type is not defined
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipe build();
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lets you manipulate Inscriber Recipes, by adding or editing existing ones.
|
||||||
|
*
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv2
|
||||||
|
* @since rv2
|
||||||
|
*/
|
||||||
|
public interface IInscriberRegistry
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Current list of registered recipes, you can modify this if you want too.
|
||||||
|
* Will never contain a null recipe
|
||||||
|
*
|
||||||
|
* @return currentlyRegisteredRecipes
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
List<IInscriberRecipe> getRecipes();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional items which are used in the top or bottom slot
|
||||||
|
*
|
||||||
|
* @return set of all optional items
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
Set<ItemStack> getOptionals();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all registered items which are valid inputs
|
||||||
|
*
|
||||||
|
* @return set of all input items
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
Set<ItemStack> getInputs();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extensible way to create an inscriber recipe
|
||||||
|
*
|
||||||
|
* @return builder for inscriber recipes
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
IInscriberRecipeBuilder builder();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* add a new recipe the easy way, duplicates will not be added.
|
||||||
|
* Added recipes will be automatically added to the optionals and inputs.
|
||||||
|
*
|
||||||
|
* @param recipe new recipe
|
||||||
|
*
|
||||||
|
* @throws IllegalArgumentException if null is added
|
||||||
|
*/
|
||||||
|
void addRecipe( IInscriberRecipe recipe );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a recipe from the registry
|
||||||
|
*
|
||||||
|
* @param toBeRemovedRecipe to be removed recipe, can be null, makes just no sense
|
||||||
|
*/
|
||||||
|
void removeRecipe( IInscriberRecipe toBeRemovedRecipe );
|
||||||
|
}
|
||||||
@@ -30,6 +30,12 @@ import appeng.api.storage.ICellRegistry;
|
|||||||
import appeng.api.storage.IExternalStorageRegistry;
|
import appeng.api.storage.IExternalStorageRegistry;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author AlgorithmX2
|
||||||
|
* @author thatsIch
|
||||||
|
* @version rv2
|
||||||
|
* @since rv0
|
||||||
|
*/
|
||||||
public interface IRegistryContainer
|
public interface IRegistryContainer
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -69,6 +75,11 @@ public interface IRegistryContainer
|
|||||||
*/
|
*/
|
||||||
IGrinderRegistry grinder();
|
IGrinderRegistry grinder();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Manage inscriber recipes via API
|
||||||
|
*/
|
||||||
|
IInscriberRegistry inscriber();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get access to the locatable registry
|
* get access to the locatable registry
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package appeng.api.features;
|
||||||
|
|
||||||
|
|
||||||
|
public enum InscriberProcessType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* uses the optionals as catalyst
|
||||||
|
*/
|
||||||
|
Inscribe,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* spends the optionals
|
||||||
|
*/
|
||||||
|
Press
|
||||||
|
}
|
||||||
@@ -59,9 +59,21 @@ public interface IStorageCell extends ICellWorkbenchItem
|
|||||||
* @param cellItem item
|
* @param cellItem item
|
||||||
*
|
*
|
||||||
* @return number of bytes
|
* @return number of bytes
|
||||||
|
*
|
||||||
|
* @deprecated use {@link IStorageCell#getBytesPerType(ItemStack)}
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
int BytePerType( ItemStack cellItem );
|
int BytePerType( ItemStack cellItem );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines the number of bytes used for any type included on the cell.
|
||||||
|
*
|
||||||
|
* @param cellItem item
|
||||||
|
*
|
||||||
|
* @return number of bytes
|
||||||
|
*/
|
||||||
|
int getBytesPerType( ItemStack cellItem );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Must be between 1 and 63, indicates how many types you want to store on
|
* Must be between 1 and 63, indicates how many types you want to store on
|
||||||
* the item.
|
* the item.
|
||||||
|
|||||||
@@ -94,4 +94,4 @@ public interface IGrid
|
|||||||
* @return the node considered the pivot point of the grid.
|
* @return the node considered the pivot point of the grid.
|
||||||
*/
|
*/
|
||||||
IGridNode getPivot();
|
IGridNode getPivot();
|
||||||
}
|
}
|
||||||
@@ -30,9 +30,9 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
public class ResolverResult
|
public class ResolverResult
|
||||||
{
|
{
|
||||||
|
|
||||||
final public String itemName;
|
public final String itemName;
|
||||||
final public int damageValue;
|
public final int damageValue;
|
||||||
final public NBTTagCompound compound;
|
public final NBTTagCompound compound;
|
||||||
|
|
||||||
public ResolverResult( String name, int damage )
|
public ResolverResult( String name, int damage )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
public StackType injectItems( StackType input, Actionable mode, BaseActionSource src )
|
public StackType injectItems( StackType input, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
if( mode == Actionable.SIMULATE )
|
if( mode == Actionable.SIMULATE )
|
||||||
|
{
|
||||||
return this.getHandler().injectItems( input, mode, src );
|
return this.getHandler().injectItems( input, mode, src );
|
||||||
|
}
|
||||||
return this.monitorDifference( input.copy(), this.getHandler().injectItems( input, mode, src ), false, src );
|
return this.monitorDifference( input.copy(), this.getHandler().injectItems( input, mode, src ), false, src );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,12 +96,18 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
StackType diff = (StackType) original.copy();
|
StackType diff = (StackType) original.copy();
|
||||||
|
|
||||||
if( extraction )
|
if( extraction )
|
||||||
|
{
|
||||||
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
|
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
|
||||||
|
}
|
||||||
else if( leftOvers != null )
|
else if( leftOvers != null )
|
||||||
|
{
|
||||||
diff.decStackSize( leftOvers.getStackSize() );
|
diff.decStackSize( leftOvers.getStackSize() );
|
||||||
|
}
|
||||||
|
|
||||||
if( diff.getStackSize() != 0 )
|
if( diff.getStackSize() != 0 )
|
||||||
|
{
|
||||||
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
||||||
|
}
|
||||||
|
|
||||||
return leftOvers;
|
return leftOvers;
|
||||||
}
|
}
|
||||||
@@ -118,9 +126,13 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
||||||
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
|
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
|
||||||
if( receiver.isValid( o.getValue() ) )
|
if( receiver.isValid( o.getValue() ) )
|
||||||
|
{
|
||||||
receiver.postChange( this, diff, src );
|
receiver.postChange( this, diff, src );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
i.remove();
|
i.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,7 +145,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
|||||||
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src )
|
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src )
|
||||||
{
|
{
|
||||||
if( mode == Actionable.SIMULATE )
|
if( mode == Actionable.SIMULATE )
|
||||||
|
{
|
||||||
return this.getHandler().extractItems( request, mode, src );
|
return this.getHandler().extractItems( request, mode, src );
|
||||||
|
}
|
||||||
return this.monitorDifference( request.copy(), this.getHandler().extractItems( request, mode, src ), true, src );
|
return this.monitorDifference( request.copy(), this.getHandler().extractItems( request, mode, src ), true, src );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,12 @@ public enum StorageChannel
|
|||||||
public IItemList createList()
|
public IItemList createList()
|
||||||
{
|
{
|
||||||
if( this == ITEMS )
|
if( this == ITEMS )
|
||||||
|
{
|
||||||
return AEApi.instance().storage().createItemList();
|
return AEApi.instance().storage().createItemList();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return AEApi.instance().storage().createFluidList();
|
return AEApi.instance().storage().createFluidList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,22 +77,22 @@ public enum AEColor
|
|||||||
/**
|
/**
|
||||||
* Unlocalized name for color.
|
* Unlocalized name for color.
|
||||||
*/
|
*/
|
||||||
final public String unlocalizedName;
|
public final String unlocalizedName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Darkest Variant of the color, nearly black; as a RGB HEX Integer
|
* Darkest Variant of the color, nearly black; as a RGB HEX Integer
|
||||||
*/
|
*/
|
||||||
final public int blackVariant;
|
public final int blackVariant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Variant of the color that is used to represent the color normally; as a RGB HEX Integer
|
* The Variant of the color that is used to represent the color normally; as a RGB HEX Integer
|
||||||
*/
|
*/
|
||||||
final public int mediumVariant;
|
public final int mediumVariant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lightest Variant of the color, nearly white; as a RGB HEX Integer
|
* Lightest Variant of the color, nearly white; as a RGB HEX Integer
|
||||||
*/
|
*/
|
||||||
final public int whiteVariant;
|
public final int whiteVariant;
|
||||||
|
|
||||||
AEColor( String unlocalizedName, int blackHex, int medHex, int whiteHex )
|
AEColor( String unlocalizedName, int blackHex, int medHex, int whiteHex )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,22 +105,34 @@ public class WorldCoord
|
|||||||
int zlen = Math.abs( oz );
|
int zlen = Math.abs( oz );
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.EAST;
|
return ForgeDirection.EAST;
|
||||||
|
}
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.WEST;
|
return ForgeDirection.WEST;
|
||||||
|
}
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.NORTH;
|
return ForgeDirection.NORTH;
|
||||||
|
}
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.SOUTH;
|
return ForgeDirection.SOUTH;
|
||||||
|
}
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.UP;
|
return ForgeDirection.UP;
|
||||||
|
}
|
||||||
|
|
||||||
if( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) )
|
if( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) )
|
||||||
|
{
|
||||||
return ForgeDirection.DOWN;
|
return ForgeDirection.DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,13 +117,21 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
super( mat );
|
super( mat );
|
||||||
|
|
||||||
if( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
if( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
||||||
|
{
|
||||||
this.setStepSound( Block.soundTypeGlass );
|
this.setStepSound( Block.soundTypeGlass );
|
||||||
|
}
|
||||||
else if( mat == Material.rock )
|
else if( mat == Material.rock )
|
||||||
|
{
|
||||||
this.setStepSound( Block.soundTypeStone );
|
this.setStepSound( Block.soundTypeStone );
|
||||||
|
}
|
||||||
else if( mat == Material.wood )
|
else if( mat == Material.wood )
|
||||||
|
{
|
||||||
this.setStepSound( Block.soundTypeWood );
|
this.setStepSound( Block.soundTypeWood );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.setStepSound( Block.soundTypeMetal );
|
this.setStepSound( Block.soundTypeMetal );
|
||||||
|
}
|
||||||
|
|
||||||
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
|
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
|
||||||
this.featureSubName = subName;
|
this.featureSubName = subName;
|
||||||
@@ -152,15 +160,24 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
public BlockRenderInfo getRendererInstance()
|
public BlockRenderInfo getRendererInstance()
|
||||||
{
|
{
|
||||||
if( this.renderInfo != null )
|
if( this.renderInfo != null )
|
||||||
|
{
|
||||||
return this.renderInfo;
|
return this.renderInfo;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return this.renderInfo = new BlockRenderInfo( this.getRenderer().newInstance() );
|
final BaseBlockRender renderer = this.getRenderer().newInstance();
|
||||||
|
this.renderInfo = new BlockRenderInfo( renderer );
|
||||||
|
|
||||||
|
return this.renderInfo;
|
||||||
}
|
}
|
||||||
catch( Throwable t )
|
catch ( InstantiationException e )
|
||||||
{
|
{
|
||||||
throw new RuntimeException( t );
|
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.getRenderer(), e );
|
||||||
|
}
|
||||||
|
catch( IllegalAccessException e )
|
||||||
|
{
|
||||||
|
throw new IllegalStateException( "Failed to create a new instance of " + this.getRenderer() + " because of permissions.", e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -196,7 +213,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public IFeatureHandler handler()
|
public final IFeatureHandler handler()
|
||||||
{
|
{
|
||||||
return this.handler;
|
return this.handler;
|
||||||
}
|
}
|
||||||
@@ -236,7 +253,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
public IIcon getIcon( int direction, int metadata )
|
public IIcon getIcon( int direction, int metadata )
|
||||||
{
|
{
|
||||||
if( this.renderIcon != null )
|
if( this.renderIcon != null )
|
||||||
|
{
|
||||||
return this.renderIcon;
|
return this.renderIcon;
|
||||||
|
}
|
||||||
|
|
||||||
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
|
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
|
||||||
}
|
}
|
||||||
@@ -249,12 +268,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
ICustomCollision collisionHandler = null;
|
ICustomCollision collisionHandler = null;
|
||||||
|
|
||||||
if( this instanceof ICustomCollision )
|
if( this instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) this;
|
collisionHandler = (ICustomCollision) this;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||||
if( te instanceof ICustomCollision )
|
if( te instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) te;
|
collisionHandler = (ICustomCollision) te;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( collisionHandler != null && bb != null )
|
if( collisionHandler != null && bb != null )
|
||||||
@@ -270,27 +293,35 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
b.maxY += y;
|
b.maxY += y;
|
||||||
b.maxZ += z;
|
b.maxZ += z;
|
||||||
if( bb.intersectsWith( b ) )
|
if( bb.intersectsWith( b ) )
|
||||||
|
{
|
||||||
out.add( b );
|
out.add( b );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
super.addCollisionBoxesToList( w, x, y, z, bb, out, e );
|
super.addCollisionBoxesToList( w, x, y, z, bb, out, e );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
final public AxisAlignedBB getSelectedBoundingBoxFromPool( World w, int x, int y, int z )
|
public final AxisAlignedBB getSelectedBoundingBoxFromPool( World w, int x, int y, int z )
|
||||||
{
|
{
|
||||||
ICustomCollision collisionHandler = null;
|
ICustomCollision collisionHandler = null;
|
||||||
AxisAlignedBB b = null;
|
AxisAlignedBB b = null;
|
||||||
|
|
||||||
if( this instanceof ICustomCollision )
|
if( this instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) this;
|
collisionHandler = (ICustomCollision) this;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||||
if( te instanceof ICustomCollision )
|
if( te instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) te;
|
collisionHandler = (ICustomCollision) te;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( collisionHandler != null )
|
if( collisionHandler != null )
|
||||||
@@ -338,7 +369,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ) )
|
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ) )
|
||||||
{
|
{
|
||||||
if( b == null )
|
if( b == null )
|
||||||
|
{
|
||||||
b = bx;
|
b = bx;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
double minX = Math.min( b.minX, bx.minX );
|
double minX = Math.min( b.minX, bx.minX );
|
||||||
@@ -354,13 +387,15 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
b.setBounds( b.minX + x, b.minY + y, b.minZ + z, b.maxX + x, b.maxY + y, b.maxZ + z );
|
b.setBounds( b.minX + x, b.minY + y, b.minZ + z, b.maxX + x, b.maxY + y, b.maxZ + z );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
b = super.getSelectedBoundingBoxFromPool( w, x, y, z );
|
b = super.getSelectedBoundingBoxFromPool( w, x, y, z );
|
||||||
|
}
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public boolean isOpaqueCube()
|
public final boolean isOpaqueCube()
|
||||||
{
|
{
|
||||||
return this.isOpaque;
|
return this.isOpaque;
|
||||||
}
|
}
|
||||||
@@ -371,12 +406,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
ICustomCollision collisionHandler = null;
|
ICustomCollision collisionHandler = null;
|
||||||
|
|
||||||
if( this instanceof ICustomCollision )
|
if( this instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) this;
|
collisionHandler = (ICustomCollision) this;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||||
if( te instanceof ICustomCollision )
|
if( te instanceof ICustomCollision )
|
||||||
|
{
|
||||||
collisionHandler = (ICustomCollision) te;
|
collisionHandler = (ICustomCollision) te;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( collisionHandler != null )
|
if( collisionHandler != null )
|
||||||
@@ -421,7 +460,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
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 )
|
if( player != null )
|
||||||
{
|
{
|
||||||
@@ -437,10 +476,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
|
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
|
||||||
|
|
||||||
if( tile == null )
|
if( tile == null )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
|
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack op = new ItemStack( this );
|
ItemStack op = new ItemStack( this );
|
||||||
for( ItemStack ol : drops )
|
for( ItemStack ol : drops )
|
||||||
@@ -449,7 +492,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
|
NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
|
||||||
if( tag != null )
|
if( tag != null )
|
||||||
|
{
|
||||||
ol.setTagCompound( tag );
|
ol.setTagCompound( tag );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +537,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -514,7 +561,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
TileEntity te = this.getTileEntity( w, x, y, z );
|
TileEntity te = this.getTileEntity( w, x, y, z );
|
||||||
if( te instanceof AEBaseTile )
|
if( te instanceof AEBaseTile )
|
||||||
|
{
|
||||||
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
|
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +586,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
TileEntity te = this.getTileEntity( w, x, y, z );
|
TileEntity te = this.getTileEntity( w, x, y, z );
|
||||||
if( te instanceof IInventory )
|
if( te instanceof IInventory )
|
||||||
|
{
|
||||||
return Container.calcRedstoneFromInventory( (IInventory) te );
|
return Container.calcRedstoneFromInventory( (IInventory) te );
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,13 +617,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public boolean isNormalCube( IBlockAccess world, int x, int y, int z )
|
public final boolean isNormalCube( IBlockAccess world, int x, int y, int z )
|
||||||
{
|
{
|
||||||
return this.isFullSize;
|
return this.isFullSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public boolean rotateBlock( World w, int x, int y, int z, ForgeDirection axis )
|
public final boolean rotateBlock( World w, int x, int y, int z, ForgeDirection axis )
|
||||||
{
|
{
|
||||||
IOrientable rotatable = null;
|
IOrientable rotatable = null;
|
||||||
|
|
||||||
@@ -630,7 +681,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final 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() )
|
if( this.hasBlockTileEntity() )
|
||||||
{
|
{
|
||||||
@@ -671,7 +722,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
// if the input is an flippable IIcon find the original.
|
// if the input is an flippable IIcon find the original.
|
||||||
while( substitute instanceof FlippableIcon )
|
while( substitute instanceof FlippableIcon )
|
||||||
|
{
|
||||||
substitute = ( (FlippableIcon) substitute ).getOriginal();
|
substitute = ( (FlippableIcon) substitute ).getOriginal();
|
||||||
|
}
|
||||||
|
|
||||||
if( substitute != null )
|
if( substitute != null )
|
||||||
{
|
{
|
||||||
@@ -682,7 +735,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
|
|
||||||
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||||
if( res != null )
|
if( res != null )
|
||||||
|
{
|
||||||
return new FlippableIcon( ir.registerIcon( Name ) );
|
return new FlippableIcon( ir.registerIcon( Name ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable e )
|
catch( Throwable e )
|
||||||
{
|
{
|
||||||
@@ -724,11 +779,15 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
|
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
|
||||||
{
|
{
|
||||||
if( !this.hasBlockTileEntity() )
|
if( !this.hasBlockTileEntity() )
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
TileEntity te = w.getTileEntity( x, y, z );
|
TileEntity te = w.getTileEntity( x, y, z );
|
||||||
if( this.tileEntityType.isInstance( te ) )
|
if( this.tileEntityType.isInstance( te ) )
|
||||||
|
{
|
||||||
return (T) te;
|
return (T) te;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -747,30 +806,48 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
ForgeDirection west = ForgeDirection.UNKNOWN;
|
ForgeDirection west = ForgeDirection.UNKNOWN;
|
||||||
|
|
||||||
if( forward == null || up == null )
|
if( forward == null || up == null )
|
||||||
|
{
|
||||||
return dir;
|
return dir;
|
||||||
|
}
|
||||||
|
|
||||||
int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
||||||
int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
||||||
int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
||||||
|
|
||||||
for( ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
for( ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
||||||
|
{
|
||||||
if( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
if( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||||
|
{
|
||||||
west = dx;
|
west = dx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( dir == forward )
|
if( dir == forward )
|
||||||
|
{
|
||||||
return ForgeDirection.SOUTH;
|
return ForgeDirection.SOUTH;
|
||||||
|
}
|
||||||
if( dir == forward.getOpposite() )
|
if( dir == forward.getOpposite() )
|
||||||
|
{
|
||||||
return ForgeDirection.NORTH;
|
return ForgeDirection.NORTH;
|
||||||
|
}
|
||||||
|
|
||||||
if( dir == up )
|
if( dir == up )
|
||||||
|
{
|
||||||
return ForgeDirection.UP;
|
return ForgeDirection.UP;
|
||||||
|
}
|
||||||
if( dir == up.getOpposite() )
|
if( dir == up.getOpposite() )
|
||||||
|
{
|
||||||
return ForgeDirection.DOWN;
|
return ForgeDirection.DOWN;
|
||||||
|
}
|
||||||
|
|
||||||
if( dir == west )
|
if( dir == west )
|
||||||
|
{
|
||||||
return ForgeDirection.WEST;
|
return ForgeDirection.WEST;
|
||||||
|
}
|
||||||
if( dir == west.getOpposite() )
|
if( dir == west.getOpposite() )
|
||||||
|
{
|
||||||
return ForgeDirection.EAST;
|
return ForgeDirection.EAST;
|
||||||
|
}
|
||||||
|
|
||||||
return ForgeDirection.UNKNOWN;
|
return ForgeDirection.UNKNOWN;
|
||||||
}
|
}
|
||||||
@@ -787,7 +864,7 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final public TileEntity createNewTileEntity( World var1, int var2 )
|
public final TileEntity createNewTileEntity( World var1, int var2 )
|
||||||
{
|
{
|
||||||
if( this.hasBlockTileEntity() )
|
if( this.hasBlockTileEntity() )
|
||||||
{
|
{
|
||||||
@@ -797,13 +874,11 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
}
|
}
|
||||||
catch( InstantiationException e )
|
catch( InstantiationException e )
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
throw new IllegalStateException( "Failed to create a new instance of an illegal class " + this.tileEntityType , e );
|
||||||
throw new RuntimeException( e );
|
|
||||||
}
|
}
|
||||||
catch( IllegalAccessException e )
|
catch( IllegalAccessException e )
|
||||||
{
|
{
|
||||||
e.printStackTrace();
|
throw new IllegalStateException( "Failed to create a new instance of " + this.tileEntityType + ", because lack of permissions", e );
|
||||||
throw new RuntimeException( e );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -818,9 +893,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
{
|
{
|
||||||
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||||
if( te.dropItems() )
|
if( te.dropItems() )
|
||||||
|
{
|
||||||
te.getDrops( w, x, y, z, drops );
|
te.getDrops( w, x, y, z, drops );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
te.getNoDrops( w, x, y, z, drops );
|
te.getNoDrops( w, x, y, z, drops );
|
||||||
|
}
|
||||||
|
|
||||||
// Cry ;_; ...
|
// Cry ;_; ...
|
||||||
Platform.spawnDrops( w, x, y, z, drops );
|
Platform.spawnDrops( w, x, y, z, drops );
|
||||||
@@ -828,7 +907,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
|
|
||||||
super.breakBlock( w, x, y, z, a, b );
|
super.breakBlock( w, x, y, z, a, b );
|
||||||
if( te != null )
|
if( te != null )
|
||||||
|
{
|
||||||
w.setTileEntity( x, y, z, null );
|
w.setTileEntity( x, y, z, null );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUnlocalizedName( ItemStack is )
|
public String getUnlocalizedName( ItemStack is )
|
||||||
|
|||||||
@@ -56,14 +56,18 @@ public class AEBaseItemBlock extends ItemBlock
|
|||||||
this.hasSubtypes = this.blockType.hasSubtypes;
|
this.hasSubtypes = this.blockType.hasSubtypes;
|
||||||
|
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
|
{
|
||||||
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
|
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetadata( int dmg )
|
public int getMetadata( int dmg )
|
||||||
{
|
{
|
||||||
if( this.hasSubtypes )
|
if( this.hasSubtypes )
|
||||||
|
{
|
||||||
return dmg;
|
return dmg;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,17 +111,25 @@ public class AEBaseItemBlock extends ItemBlock
|
|||||||
{
|
{
|
||||||
up = ForgeDirection.getOrientation( side );
|
up = ForgeDirection.getOrientation( side );
|
||||||
if( up == ForgeDirection.UP || up == ForgeDirection.DOWN )
|
if( up == ForgeDirection.UP || up == ForgeDirection.DOWN )
|
||||||
|
{
|
||||||
forward = ForgeDirection.SOUTH;
|
forward = ForgeDirection.SOUTH;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
forward = ForgeDirection.UP;
|
forward = ForgeDirection.UP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( this.blockType instanceof BlockWireless || this.blockType instanceof BlockSkyCompass )
|
else if( this.blockType instanceof BlockWireless || this.blockType instanceof BlockSkyCompass )
|
||||||
{
|
{
|
||||||
forward = ForgeDirection.getOrientation( side );
|
forward = ForgeDirection.getOrientation( side );
|
||||||
if( forward == ForgeDirection.UP || forward == ForgeDirection.DOWN )
|
if( forward == ForgeDirection.UP || forward == ForgeDirection.DOWN )
|
||||||
|
{
|
||||||
up = ForgeDirection.SOUTH;
|
up = ForgeDirection.SOUTH;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
up = ForgeDirection.UP;
|
up = ForgeDirection.UP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -161,13 +173,15 @@ public class AEBaseItemBlock extends ItemBlock
|
|||||||
up = ForgeDirection.getOrientation( side );
|
up = ForgeDirection.getOrientation( side );
|
||||||
forward = ForgeDirection.SOUTH;
|
forward = ForgeDirection.SOUTH;
|
||||||
if( up.offsetY == 0 )
|
if( up.offsetY == 0 )
|
||||||
|
{
|
||||||
forward = ForgeDirection.UP;
|
forward = ForgeDirection.UP;
|
||||||
|
}
|
||||||
ori.setOrientation( forward, up );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) )
|
if( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
|
if( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
|
||||||
{
|
{
|
||||||
@@ -177,13 +191,17 @@ public class AEBaseItemBlock extends ItemBlock
|
|||||||
ori = tile;
|
ori = tile;
|
||||||
|
|
||||||
if( tile == null )
|
if( tile == null )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
|
if( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
|
||||||
{
|
{
|
||||||
if( ori.getForward() == null || ori.getUp() == null || // null
|
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 );
|
ori.setOrientation( forward, up );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( tile instanceof IGridProxyable )
|
if( tile instanceof IGridProxyable )
|
||||||
|
|||||||
@@ -89,13 +89,19 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
|||||||
public String getUnlocalizedName( ItemStack is )
|
public String getUnlocalizedName( ItemStack is )
|
||||||
{
|
{
|
||||||
if( is.getItemDamage() == 1 )
|
if( is.getItemDamage() == 1 )
|
||||||
|
{
|
||||||
return "tile.appliedenergistics2.BlockCraftingStorage4k";
|
return "tile.appliedenergistics2.BlockCraftingStorage4k";
|
||||||
|
}
|
||||||
|
|
||||||
if( is.getItemDamage() == 2 )
|
if( is.getItemDamage() == 2 )
|
||||||
|
{
|
||||||
return "tile.appliedenergistics2.BlockCraftingStorage16k";
|
return "tile.appliedenergistics2.BlockCraftingStorage16k";
|
||||||
|
}
|
||||||
|
|
||||||
if( is.getItemDamage() == 3 )
|
if( is.getItemDamage() == 3 )
|
||||||
|
{
|
||||||
return "tile.appliedenergistics2.BlockCraftingStorage64k";
|
return "tile.appliedenergistics2.BlockCraftingStorage64k";
|
||||||
|
}
|
||||||
|
|
||||||
return this.getItemUnlocalizedName( is );
|
return this.getItemUnlocalizedName( is );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
|||||||
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
||||||
{
|
{
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
|
||||||
return true;
|
return true;
|
||||||
@@ -124,7 +126,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
||||||
if( cp != null )
|
if( cp != null )
|
||||||
|
{
|
||||||
cp.breakCluster();
|
cp.breakCluster();
|
||||||
|
}
|
||||||
|
|
||||||
super.breakBlock( w, x, y, z, a, b );
|
super.breakBlock( w, x, y, z, a, b );
|
||||||
}
|
}
|
||||||
@@ -133,7 +137,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
|||||||
public String getUnlocalizedName( ItemStack is )
|
public String getUnlocalizedName( ItemStack is )
|
||||||
{
|
{
|
||||||
if( is.getItemDamage() == 1 )
|
if( is.getItemDamage() == 1 )
|
||||||
|
{
|
||||||
return "tile.appliedenergistics2.BlockCraftingAccelerator";
|
return "tile.appliedenergistics2.BlockCraftingAccelerator";
|
||||||
|
}
|
||||||
|
|
||||||
return this.getItemUnlocalizedName( is );
|
return this.getItemUnlocalizedName( is );
|
||||||
}
|
}
|
||||||
@@ -148,7 +154,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
||||||
if( cp != null )
|
if( cp != null )
|
||||||
|
{
|
||||||
cp.updateMultiBlock();
|
cp.updateMultiBlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ public class BlockMolecularAssembler extends AEBaseBlock
|
|||||||
public BlockMolecularAssembler()
|
public BlockMolecularAssembler()
|
||||||
{
|
{
|
||||||
super( BlockMolecularAssembler.class, Material.iron );
|
super( BlockMolecularAssembler.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
|
|
||||||
this.setTileEntity( TileMolecularAssembler.class );
|
this.setTileEntity( TileMolecularAssembler.class );
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
this.lightOpacity = 1;
|
this.lightOpacity = 1;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.MolecularAssembler ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ public class BlockCrank extends AEBaseBlock
|
|||||||
public BlockCrank()
|
public BlockCrank()
|
||||||
{
|
{
|
||||||
super( BlockCrank.class, Material.wood );
|
super( BlockCrank.class, Material.wood );
|
||||||
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
|
||||||
this.setTileEntity( TileCrank.class );
|
this.setTileEntity( TileCrank.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.setHarvestLevel( "axe", 0 );
|
this.setHarvestLevel( "axe", 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -117,10 +117,12 @@ public class BlockCrank extends AEBaseBlock
|
|||||||
private ForgeDirection findCrankable( World world, int x, int y, int z )
|
private ForgeDirection findCrankable( World world, int x, int y, int z )
|
||||||
{
|
{
|
||||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||||
|
{
|
||||||
if( this.isCrankable( world, x, y, z, dir ) )
|
if( this.isCrankable( world, x, y, z, dir ) )
|
||||||
{
|
{
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ForgeDirection.UNKNOWN;
|
return ForgeDirection.UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ public class BlockGrinder extends AEBaseBlock
|
|||||||
public BlockGrinder()
|
public BlockGrinder()
|
||||||
{
|
{
|
||||||
super( BlockGrinder.class, Material.rock );
|
super( BlockGrinder.class, Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
|
||||||
this.setTileEntity( TileGrinder.class );
|
this.setTileEntity( TileGrinder.class );
|
||||||
this.setHardness( 3.2F );
|
this.setHardness( 3.2F );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.GrindStone ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -39,21 +39,25 @@ public class BlockCellWorkbench extends AEBaseBlock
|
|||||||
public BlockCellWorkbench()
|
public BlockCellWorkbench()
|
||||||
{
|
{
|
||||||
super( BlockCellWorkbench.class, Material.iron );
|
super( BlockCellWorkbench.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
|
||||||
this.setTileEntity( TileCellWorkbench.class );
|
this.setTileEntity( TileCellWorkbench.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.StorageCells ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileCellWorkbench tg = this.getTileEntity( w, x, y, z );
|
TileCellWorkbench tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockCharger()
|
public BlockCharger()
|
||||||
{
|
{
|
||||||
super( BlockCharger.class, Material.iron );
|
super( BlockCharger.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileCharger.class );
|
this.setTileEntity( TileCharger.class );
|
||||||
this.setLightOpacity( 2 );
|
this.setLightOpacity( 2 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -71,7 +71,9 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( player.isSneaking() )
|
if( player.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
@@ -90,10 +92,14 @@ public class BlockCharger extends AEBaseBlock implements ICustomCollision
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( r.nextFloat() < 0.98 )
|
if( r.nextFloat() < 0.98 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
||||||
if( tile instanceof TileCharger )
|
if( tile instanceof TileCharger )
|
||||||
|
|||||||
@@ -39,15 +39,17 @@ public class BlockCondenser extends AEBaseBlock
|
|||||||
public BlockCondenser()
|
public BlockCondenser()
|
||||||
{
|
{
|
||||||
super( BlockCondenser.class, Material.iron );
|
super( BlockCondenser.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileCondenser.class );
|
this.setTileEntity( TileCondenser.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( player.isSneaking() )
|
if( player.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -41,10 +41,10 @@ public class BlockInscriber extends AEBaseBlock
|
|||||||
public BlockInscriber()
|
public BlockInscriber()
|
||||||
{
|
{
|
||||||
super( BlockInscriber.class, Material.iron );
|
super( BlockInscriber.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
|
|
||||||
this.setTileEntity( TileInscriber.class );
|
this.setTileEntity( TileInscriber.class );
|
||||||
this.setLightOpacity( 2 );
|
this.setLightOpacity( 2 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Inscriber ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -57,13 +57,17 @@ public class BlockInscriber extends AEBaseBlock
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileInscriber tg = this.getTileEntity( w, x, y, z );
|
TileInscriber tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INSCRIBER );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INSCRIBER );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ public class BlockInterface extends AEBaseBlock
|
|||||||
public BlockInterface()
|
public BlockInterface()
|
||||||
{
|
{
|
||||||
super( BlockInterface.class, Material.iron );
|
super( BlockInterface.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileInterface.class );
|
this.setTileEntity( TileInterface.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -56,13 +56,17 @@ public class BlockInterface extends AEBaseBlock
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileInterface tg = this.getTileEntity( w, x, y, z );
|
TileInterface tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INTERFACE );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INTERFACE );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -38,15 +38,17 @@ public class BlockLightDetector extends BlockQuartzTorch
|
|||||||
public BlockLightDetector()
|
public BlockLightDetector()
|
||||||
{
|
{
|
||||||
super( BlockLightDetector.class );
|
super( BlockLightDetector.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
|
|
||||||
this.setTileEntity( TileLightDetector.class );
|
this.setTileEntity( TileLightDetector.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.LightDetector ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int isProvidingWeakPower( IBlockAccess w, int x, int y, int z, int side )
|
public int isProvidingWeakPower( IBlockAccess w, int x, int y, int z, int side )
|
||||||
{
|
{
|
||||||
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, x, y, z ) ).isReady() )
|
if( w instanceof World && ( (TileLightDetector) this.getTileEntity( w, x, y, z ) ).isReady() )
|
||||||
|
{
|
||||||
return ( (World) w ).getBlockLightValue( x, y, z ) - 6;
|
return ( (World) w ).getBlockLightValue( x, y, z ) - 6;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -58,7 +60,9 @@ public class BlockLightDetector extends BlockQuartzTorch
|
|||||||
|
|
||||||
TileLightDetector tld = this.getTileEntity( world, x, y, z );
|
TileLightDetector tld = this.getTileEntity( world, x, y, z );
|
||||||
if( tld != null )
|
if( tld != null )
|
||||||
|
{
|
||||||
tld.updateLight();
|
tld.updateLight();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ public class BlockPaint extends AEBaseBlock
|
|||||||
public BlockPaint()
|
public BlockPaint()
|
||||||
{
|
{
|
||||||
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
|
super( BlockPaint.class, new MaterialLiquid( MapColor.airColor ) );
|
||||||
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
|
|
||||||
this.setTileEntity( TilePaint.class );
|
this.setTileEntity( TilePaint.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = false;
|
this.isFullSize = false;
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.PaintBalls ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -88,7 +88,9 @@ public class BlockPaint extends AEBaseBlock
|
|||||||
TilePaint tp = this.getTileEntity( w, x, y, z );
|
TilePaint tp = this.getTileEntity( w, x, y, z );
|
||||||
|
|
||||||
if( tp != null )
|
if( tp != null )
|
||||||
|
{
|
||||||
tp.onNeighborBlockChange();
|
tp.onNeighborBlockChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -107,7 +109,9 @@ public class BlockPaint extends AEBaseBlock
|
|||||||
public void fillWithRain( World w, int x, int y, int z )
|
public void fillWithRain( World w, int x, int y, int z )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
|||||||
{
|
{
|
||||||
super( BlockQuartzGrowthAccelerator.class, Material.rock );
|
super( BlockQuartzGrowthAccelerator.class, Material.rock );
|
||||||
this.setStepSound( Block.soundTypeMetal );
|
this.setStepSound( Block.soundTypeMetal );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
this.setTileEntity( TileQuartzGrowthAccelerator.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -68,7 +68,9 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
|
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
|
||||||
|
|
||||||
@@ -98,25 +100,33 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
|||||||
dx = 0.6;
|
dx = 0.6;
|
||||||
dz = d1;
|
dz = d1;
|
||||||
if( !w.getBlock( x + west.offsetX, y + west.offsetY, z + west.offsetZ ).isAir( w, x + west.offsetX, y + west.offsetY, z + west.offsetZ ) )
|
if( !w.getBlock( x + west.offsetX, y + west.offsetY, z + west.offsetZ ).isAir( w, x + west.offsetX, y + west.offsetY, z + west.offsetZ ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
dx = d1;
|
dx = d1;
|
||||||
dz += 0.6;
|
dz += 0.6;
|
||||||
if( !w.getBlock( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ).isAir( w, x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ) )
|
if( !w.getBlock( x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ).isAir( w, x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
dx = d1;
|
dx = d1;
|
||||||
dz = -0.6;
|
dz = -0.6;
|
||||||
if( !w.getBlock( x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ).isAir( w, x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ) )
|
if( !w.getBlock( x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ).isAir( w, x - forward.offsetX, y - forward.offsetY, z - forward.offsetZ ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
dx = -0.6;
|
dx = -0.6;
|
||||||
dz = d1;
|
dz = d1;
|
||||||
if( !w.getBlock( x - west.offsetX, y - west.offsetY, z - west.offsetZ ).isAir( w, x - west.offsetX, y - west.offsetY, z - west.offsetZ ) )
|
if( !w.getBlock( x - west.offsetX, y - west.offsetY, z - west.offsetZ ).isAir( w, x - west.offsetX, y - west.offsetY, z - west.offsetZ ) )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||||||
public BlockQuartzTorch()
|
public BlockQuartzTorch()
|
||||||
{
|
{
|
||||||
this( BlockQuartzTorch.class );
|
this( BlockQuartzTorch.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
|
||||||
this.setLightLevel( 0.9375F );
|
this.setLightLevel( 0.9375F );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.DecorativeLights ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
protected BlockQuartzTorch( Class which )
|
protected BlockQuartzTorch( Class which )
|
||||||
@@ -107,10 +107,14 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( r.nextFloat() < 0.98 )
|
if( r.nextFloat() < 0.98 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
|
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
|
||||||
double xOff = -0.3 * up.offsetX;
|
double xOff = -0.3 * up.offsetX;
|
||||||
@@ -132,7 +136,9 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||||||
{
|
{
|
||||||
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
|
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
|
||||||
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
||||||
|
{
|
||||||
this.dropTorch( w, x, y, z );
|
this.dropTorch( w, x, y, z );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dropTorch( World w, int x, int y, int z )
|
private void dropTorch( World w, int x, int y, int z )
|
||||||
@@ -146,8 +152,12 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
|||||||
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
||||||
{
|
{
|
||||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||||
|
{
|
||||||
if( this.canPlaceAt( w, x, y, z, dir ) )
|
if( this.canPlaceAt( w, x, y, z, dir ) )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class BlockSecurity extends AEBaseBlock
|
|||||||
public BlockSecurity()
|
public BlockSecurity()
|
||||||
{
|
{
|
||||||
super( BlockSecurity.class, Material.iron );
|
super( BlockSecurity.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
|
||||||
this.setTileEntity( TileSecurity.class );
|
this.setTileEntity( TileSecurity.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Security ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -55,13 +55,17 @@ public class BlockSecurity extends AEBaseBlock
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileSecurity tg = this.getTileEntity( w, x, y, z );
|
TileSecurity tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -50,10 +50,10 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockSkyCompass()
|
public BlockSkyCompass()
|
||||||
{
|
{
|
||||||
super( BlockSkyCompass.class, Material.iron );
|
super( BlockSkyCompass.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
|
|
||||||
this.setTileEntity( TileSkyCompass.class );
|
this.setTileEntity( TileSkyCompass.class );
|
||||||
this.isOpaque = this.isFullSize = false;
|
this.isOpaque = this.isFullSize = false;
|
||||||
this.lightOpacity = 0;
|
this.lightOpacity = 0;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.MeteoriteCompass ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -80,7 +80,9 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
|||||||
{
|
{
|
||||||
TileSkyCompass sc = this.getTileEntity( w, x, y, z );
|
TileSkyCompass sc = this.getTileEntity( w, x, y, z );
|
||||||
if( sc != null )
|
if( sc != null )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
return this.canPlaceAt( w, x, y, z, forward.getOpposite() );
|
return this.canPlaceAt( w, x, y, z, forward.getOpposite() );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +97,9 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
|||||||
TileSkyCompass sc = this.getTileEntity( w, x, y, z );
|
TileSkyCompass sc = this.getTileEntity( w, x, y, z );
|
||||||
ForgeDirection up = sc.getForward();
|
ForgeDirection up = sc.getForward();
|
||||||
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
||||||
|
{
|
||||||
this.dropTorch( w, x, y, z );
|
this.dropTorch( w, x, y, z );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dropTorch( World w, int x, int y, int z )
|
private void dropTorch( World w, int x, int y, int z )
|
||||||
@@ -109,8 +113,12 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
|||||||
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
||||||
{
|
{
|
||||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||||
|
{
|
||||||
if( this.canPlaceAt( w, x, y, z, dir ) )
|
if( this.canPlaceAt( w, x, y, z, dir ) )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,12 +59,12 @@ public class BlockTinyTNT extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockTinyTNT()
|
public BlockTinyTNT()
|
||||||
{
|
{
|
||||||
super( BlockTinyTNT.class, Material.tnt );
|
super( BlockTinyTNT.class, Material.tnt );
|
||||||
this.setFeature( EnumSet.of( AEFeature.TinyTNT ) );
|
|
||||||
this.setLightOpacity( 1 );
|
this.setLightOpacity( 1 );
|
||||||
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
this.setBlockBounds( 0.25f, 0.0f, 0.25f, 0.75f, 0.5f, 0.75f );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
this.setStepSound( soundTypeGrass );
|
this.setStepSound( soundTypeGrass );
|
||||||
this.setHardness( 0F );
|
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 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,15 +39,15 @@ import appeng.tile.misc.TileVibrationChamber;
|
|||||||
import appeng.util.Platform;
|
import appeng.util.Platform;
|
||||||
|
|
||||||
|
|
||||||
public class BlockVibrationChamber extends AEBaseBlock
|
public final class BlockVibrationChamber extends AEBaseBlock
|
||||||
{
|
{
|
||||||
|
|
||||||
public BlockVibrationChamber()
|
public BlockVibrationChamber()
|
||||||
{
|
{
|
||||||
super( BlockVibrationChamber.class, Material.iron );
|
super( BlockVibrationChamber.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
|
||||||
this.setTileEntity( TileVibrationChamber.class );
|
this.setTileEntity( TileVibrationChamber.class );
|
||||||
this.setHardness( 4.2F );
|
this.setHardness( 4.2F );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.PowerGen ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -68,7 +68,9 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( player.isSneaking() )
|
if( player.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
{
|
{
|
||||||
@@ -87,7 +89,9 @@ public class BlockVibrationChamber extends AEBaseBlock
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
||||||
if( tile instanceof TileVibrationChamber )
|
if( tile instanceof TileVibrationChamber )
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
{
|
{
|
||||||
|
|
||||||
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
private static final ICableBusContainer NULL_CABLE_BUS = new NullCableBusContainer();
|
||||||
static public Class<? extends TileEntity> noTesrTile;
|
public static Class<? extends TileEntity> noTesrTile;
|
||||||
static public Class<? extends TileEntity> tesrTile;
|
public static Class<? extends TileEntity> tesrTile;
|
||||||
/**
|
/**
|
||||||
* Immibis MB Support.
|
* Immibis MB Support.
|
||||||
*/
|
*/
|
||||||
@@ -92,9 +92,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
public BlockCableBus()
|
public BlockCableBus()
|
||||||
{
|
{
|
||||||
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
|
super( BlockCableBus.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -119,7 +119,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
public int getRenderBlockPass()
|
public int getRenderBlockPass()
|
||||||
{
|
{
|
||||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,7 +164,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
return block.getLightValue( world, x, y, z );
|
return block.getLightValue( world, x, y, z );
|
||||||
}
|
}
|
||||||
if( block == null )
|
if( block == null )
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return this.cb( world, x, y, z ).getLightValue();
|
return this.cb( world, x, y, z ).getLightValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +196,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
{
|
{
|
||||||
AEBaseTile tile = this.getTileEntity( world, x, y, z );
|
AEBaseTile tile = this.getTileEntity( world, x, y, z );
|
||||||
if( tile != null )
|
if( tile != null )
|
||||||
|
{
|
||||||
tile.disableDrops();
|
tile.disableDrops();
|
||||||
|
}
|
||||||
// maybe ray trace?
|
// maybe ray trace?
|
||||||
}
|
}
|
||||||
return super.removedByPlayer( world, player, x, y, z );
|
return super.removedByPlayer( world, player, x, y, z );
|
||||||
@@ -224,21 +230,27 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
BusRenderHelper.INSTANCE.setPass( pass );
|
BusRenderHelper.INSTANCE.setPass( pass );
|
||||||
|
|
||||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return pass == 0;
|
return pass == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
|
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player )
|
||||||
{
|
{
|
||||||
Vec3 v3 = target.hitVec.addVector( -x, -y, -z );
|
Vec3 v3 = target.hitVec.addVector( -x, -y, -z );
|
||||||
SelectedPart sp = this.cb( world, x, y, z ).selectPart( v3 );
|
SelectedPart sp = this.cb( world, x, y, z ).selectPart( v3 );
|
||||||
|
|
||||||
if( sp.part != null )
|
if( sp.part != null )
|
||||||
|
{
|
||||||
return sp.part.getItemStack( PartItemStack.Pick );
|
return sp.part.getItemStack( PartItemStack.Pick );
|
||||||
|
}
|
||||||
else if( sp.facade != null )
|
else if( sp.facade != null )
|
||||||
|
{
|
||||||
return sp.facade.getItemStack();
|
return sp.facade.getItemStack();
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -258,7 +270,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
IIcon ico = this.getIcon( p );
|
IIcon ico = this.getIcon( p );
|
||||||
|
|
||||||
if( ico == null )
|
if( ico == null )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
byte b0 = (byte) ( Platform.getRandomInt() % 2 == 0 ? 1 : 0 );
|
byte b0 = (byte) ( Platform.getRandomInt() % 2 == 0 ? 1 : 0 );
|
||||||
|
|
||||||
@@ -304,7 +318,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
IIcon ico = this.getIcon( p );
|
IIcon ico = this.getIcon( p );
|
||||||
|
|
||||||
if( ico == null )
|
if( ico == null )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
byte b0 = 3;
|
byte b0 = 3;
|
||||||
|
|
||||||
@@ -335,19 +351,25 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
public void onNeighborChange( IBlockAccess w, int x, int y, int z, int tileX, int tileY, int tileZ )
|
public void onNeighborChange( IBlockAccess w, int x, int y, int z, int tileX, int tileY, int tileZ )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
this.cb( w, x, y, z ).onNeighborChanged();
|
this.cb( w, x, y, z ).onNeighborChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IIcon getIcon( IPart p )
|
private IIcon getIcon( IPart p )
|
||||||
{
|
{
|
||||||
if( p == null )
|
if( p == null )
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IIcon ico = p.getBreakingTexture();
|
IIcon ico = p.getBreakingTexture();
|
||||||
if( ico != null )
|
if( ico != null )
|
||||||
|
{
|
||||||
return ico;
|
return ico;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( Throwable t )
|
catch( Throwable t )
|
||||||
{
|
{
|
||||||
@@ -356,7 +378,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
|
|
||||||
ItemStack is = p.getItemStack( PartItemStack.Network );
|
ItemStack is = p.getItemStack( PartItemStack.Network );
|
||||||
if( is == null || is.getItem() == null )
|
if( is == null || is.getItem() == null )
|
||||||
|
{
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return is.getItem().getIcon( is, 0 );
|
return is.getItem().getIcon( is, 0 );
|
||||||
}
|
}
|
||||||
@@ -367,10 +391,13 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
ICableBusContainer out = null;
|
ICableBusContainer out = null;
|
||||||
|
|
||||||
if( te instanceof TileCableBus )
|
if( te instanceof TileCableBus )
|
||||||
|
{
|
||||||
out = ( (TileCableBus) te ).cb;
|
out = ( (TileCableBus) te ).cb;
|
||||||
|
}
|
||||||
else if( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
else if( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
||||||
|
{
|
||||||
out = ( (IFMP) AppEng.instance.getIntegration( IntegrationType.FMP ) ).getCableContainer( te );
|
out = ( (IFMP) AppEng.instance.getIntegration( IntegrationType.FMP ) ).getCableContainer( te );
|
||||||
|
}
|
||||||
|
|
||||||
return out == null ? NULL_CABLE_BUS : out;
|
return out == null ? NULL_CABLE_BUS : out;
|
||||||
}
|
}
|
||||||
@@ -392,7 +419,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
{
|
{
|
||||||
IIcon i = super.getIcon( direction, metadata );
|
IIcon i = super.getIcon( direction, metadata );
|
||||||
if( i != null )
|
if( i != null )
|
||||||
|
{
|
||||||
return i;
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
return ExtraBlockTextures.BlockQuartzGlassB.getIcon();
|
return ExtraBlockTextures.BlockQuartzGlassB.getIcon();
|
||||||
}
|
}
|
||||||
@@ -440,20 +469,24 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
|||||||
TileEntity te = w.getTileEntity( x, y, z );
|
TileEntity te = w.getTileEntity( x, y, z );
|
||||||
|
|
||||||
if( noTesrTile.isInstance( te ) )
|
if( noTesrTile.isInstance( te ) )
|
||||||
|
{
|
||||||
return (T) te;
|
return (T) te;
|
||||||
|
}
|
||||||
|
|
||||||
if( tesrTile != null && tesrTile.isInstance( te ) )
|
if( tesrTile != null && tesrTile.isInstance( te ) )
|
||||||
|
{
|
||||||
return (T) te;
|
return (T) te;
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setupTile()
|
public void setupTile()
|
||||||
{
|
{
|
||||||
this.setTileEntity( noTesrTile = Api.INSTANCE.getPartHelper().getCombinedInstance( TileCableBus.class.getName() ) );
|
this.setTileEntity( noTesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBus.class.getName() ) );
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
{
|
{
|
||||||
tesrTile = Api.INSTANCE.getPartHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
|
tesrTile = Api.INSTANCE.partHelper().getCombinedInstance( TileCableBusTESR.class.getName() );
|
||||||
GameRegistry.registerTileEntity( tesrTile, "ClientOnly_TESR_CableBus" );
|
GameRegistry.registerTileEntity( tesrTile, "ClientOnly_TESR_CableBus" );
|
||||||
CommonHelper.proxy.bindTileEntitySpecialRenderer( tesrTile, this );
|
CommonHelper.proxy.bindTileEntitySpecialRenderer( tesrTile, this );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ public class BlockController extends AEBaseBlock
|
|||||||
public BlockController()
|
public BlockController()
|
||||||
{
|
{
|
||||||
super( BlockController.class, Material.iron );
|
super( BlockController.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Channels ) );
|
|
||||||
this.setTileEntity( TileController.class );
|
this.setTileEntity( TileController.class );
|
||||||
this.setHardness( 6 );
|
this.setHardness( 6 );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Channels ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,7 +48,9 @@ public class BlockController extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileController tc = this.getTileEntity( w, x, y, z );
|
TileController tc = this.getTileEntity( w, x, y, z );
|
||||||
if( tc != null )
|
if( tc != null )
|
||||||
|
{
|
||||||
tc.onNeighborChange( false );
|
tc.onNeighborChange( false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class BlockCreativeEnergyCell extends AEBaseBlock
|
|||||||
public BlockCreativeEnergyCell()
|
public BlockCreativeEnergyCell()
|
||||||
{
|
{
|
||||||
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
|
super( BlockCreativeEnergyCell.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
|
||||||
this.setTileEntity( TileCreativeEnergyCell.class );
|
this.setTileEntity( TileCreativeEnergyCell.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Creative ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ public class BlockDenseEnergyCell extends BlockEnergyCell
|
|||||||
public BlockDenseEnergyCell()
|
public BlockDenseEnergyCell()
|
||||||
{
|
{
|
||||||
super( BlockDenseEnergyCell.class );
|
super( BlockDenseEnergyCell.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
|
|
||||||
this.setTileEntity( TileDenseEnergyCell.class );
|
this.setTileEntity( TileDenseEnergyCell.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.DenseEnergyCells ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class BlockEnergyAcceptor extends AEBaseBlock
|
|||||||
public BlockEnergyAcceptor()
|
public BlockEnergyAcceptor()
|
||||||
{
|
{
|
||||||
super( BlockEnergyAcceptor.class, Material.iron );
|
super( BlockEnergyAcceptor.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileEnergyAcceptor.class );
|
this.setTileEntity( TileEnergyAcceptor.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ public class BlockEnergyCell extends AEBaseBlock
|
|||||||
public BlockEnergyCell()
|
public BlockEnergyCell()
|
||||||
{
|
{
|
||||||
this( BlockEnergyCell.class );
|
this( BlockEnergyCell.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setTileEntity( TileEnergyCell.class );
|
this.setTileEntity( TileEnergyCell.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockEnergyCell( Class c )
|
public BlockEnergyCell( Class c )
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockWireless()
|
public BlockWireless()
|
||||||
{
|
{
|
||||||
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
|
super( BlockWireless.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
|
||||||
this.setTileEntity( TileWireless.class );
|
this.setTileEntity( TileWireless.class );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = false;
|
this.isFullSize = false;
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.WirelessAccessTerminal ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -63,13 +63,17 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileWireless tg = this.getTileEntity( w, x, y, z );
|
TileWireless tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_WIRELESS );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_WIRELESS );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -197,6 +201,8 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
|||||||
out.add( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) );
|
out.add( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,12 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
public BlockQuantumLinkChamber()
|
public BlockQuantumLinkChamber()
|
||||||
{
|
{
|
||||||
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
|
super( BlockQuantumLinkChamber.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
|
||||||
this.setTileEntity( TileQuantumBridge.class );
|
this.setTileEntity( TileQuantumBridge.class );
|
||||||
float shave = 2.0f / 16.0f;
|
float shave = 2.0f / 16.0f;
|
||||||
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -71,7 +71,9 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
if( bridge.hasQES() )
|
if( bridge.hasQES() )
|
||||||
{
|
{
|
||||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||||
|
{
|
||||||
CommonHelper.proxy.spawnEffect( EffectType.Energy, w, bx + 0.5, by + 0.5, bz + 0.5, null );
|
CommonHelper.proxy.spawnEffect( EffectType.Energy, w, bx + 0.5, by + 0.5, bz + 0.5, null );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +83,9 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
{
|
{
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null )
|
if( bridge != null )
|
||||||
|
{
|
||||||
bridge.neighborUpdate();
|
bridge.neighborUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,13 +98,17 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileQuantumBridge tg = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_QNB );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_QNB );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -111,7 +119,9 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
|||||||
{
|
{
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null )
|
if( bridge != null )
|
||||||
|
{
|
||||||
bridge.breakCluster();
|
bridge.breakCluster();
|
||||||
|
}
|
||||||
|
|
||||||
super.breakBlock( w, x, y, z, a, b );
|
super.breakBlock( w, x, y, z, a, b );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockQuantumRing()
|
public BlockQuantumRing()
|
||||||
{
|
{
|
||||||
super( BlockQuantumRing.class, Material.iron );
|
super( BlockQuantumRing.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
|
||||||
this.setTileEntity( TileQuantumBridge.class );
|
this.setTileEntity( TileQuantumBridge.class );
|
||||||
float shave = 2.0f / 16.0f;
|
float shave = 2.0f / 16.0f;
|
||||||
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
this.setBlockBounds( shave, shave, shave, 1.0f - shave, 1.0f - shave, 1.0f - shave );
|
||||||
this.setLightOpacity( 1 );
|
this.setLightOpacity( 1 );
|
||||||
this.isFullSize = this.isOpaque = false;
|
this.isFullSize = this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.QuantumNetworkBridge ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -56,7 +56,9 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
|||||||
{
|
{
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null )
|
if( bridge != null )
|
||||||
|
{
|
||||||
bridge.neighborUpdate();
|
bridge.neighborUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -70,7 +72,9 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
|||||||
{
|
{
|
||||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||||
if( bridge != null )
|
if( bridge != null )
|
||||||
|
{
|
||||||
bridge.breakCluster();
|
bridge.breakCluster();
|
||||||
|
}
|
||||||
|
|
||||||
super.breakBlock( w, x, y, z, a, b );
|
super.breakBlock( w, x, y, z, a, b );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,9 +45,9 @@ public class BlockQuartzGlass extends AEBaseBlock
|
|||||||
public BlockQuartzGlass( Class c )
|
public BlockQuartzGlass( Class c )
|
||||||
{
|
{
|
||||||
super( c, Material.glass );
|
super( c, Material.glass );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +64,9 @@ public class BlockQuartzGlass extends AEBaseBlock
|
|||||||
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||||
{
|
{
|
||||||
if( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
if( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.shouldSideBeRendered( w, x, y, z, side );
|
return super.shouldSideBeRendered( w, x, y, z, side );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
|||||||
public BlockQuartzLamp()
|
public BlockQuartzLamp()
|
||||||
{
|
{
|
||||||
super( BlockQuartzLamp.class );
|
super( BlockQuartzLamp.class );
|
||||||
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
|
|
||||||
this.setLightLevel( 1.0f );
|
this.setLightLevel( 1.0f );
|
||||||
this.setBlockTextureName( "BlockQuartzGlass" );
|
this.setBlockTextureName( "BlockQuartzGlass" );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.DecorativeQuartzBlocks, AEFeature.DecorativeLights ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -50,7 +50,9 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -72,11 +72,12 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
public BlockSkyStone()
|
public BlockSkyStone()
|
||||||
{
|
{
|
||||||
super( BlockSkyStone.class, Material.rock );
|
super( BlockSkyStone.class, Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setHardness( 50 );
|
this.setHardness( 50 );
|
||||||
this.hasSubtypes = true;
|
this.hasSubtypes = true;
|
||||||
this.blockResistance = 150.0f;
|
this.blockResistance = 150.0f;
|
||||||
this.setHarvestLevel( "pickaxe", 3, 0 );
|
this.setHarvestLevel( "pickaxe", 3, 0 );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
|
|
||||||
MinecraftForge.EVENT_BUS.register( this );
|
MinecraftForge.EVENT_BUS.register( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,10 +90,14 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
int level = -1;
|
int level = -1;
|
||||||
|
|
||||||
if( is != null )
|
if( is != null )
|
||||||
|
{
|
||||||
level = is.getItem().getHarvestLevel( is, "pickaxe" );
|
level = is.getItem().getHarvestLevel( is, "pickaxe" );
|
||||||
|
}
|
||||||
|
|
||||||
if( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
|
if( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
|
||||||
|
{
|
||||||
Ev.newSpeed /= 0.1;
|
Ev.newSpeed /= 0.1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -116,7 +121,9 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
{
|
{
|
||||||
super.onBlockAdded( w, x, y, z );
|
super.onBlockAdded( w, x, y, z );
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// use AE2's renderer, no rotatable blocks.
|
// use AE2's renderer, no rotatable blocks.
|
||||||
@@ -141,12 +148,16 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
{
|
{
|
||||||
IOrientable out = ( (IRB) AppEng.instance.getIntegration( IntegrationType.RB ) ).getOrientable( te );
|
IOrientable out = ( (IRB) AppEng.instance.getIntegration( IntegrationType.RB ) ).getOrientable( te );
|
||||||
if( out != null )
|
if( out != null )
|
||||||
|
{
|
||||||
return out;
|
return out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( w.getBlockMetadata( x, y, z ) == 0 )
|
if( w.getBlockMetadata( x, y, z ) == 0 )
|
||||||
|
{
|
||||||
return new LocationRotation( w, x, y, z );
|
return new LocationRotation( w, x, y, z );
|
||||||
|
}
|
||||||
|
|
||||||
return new NullRotation();
|
return new NullRotation();
|
||||||
}
|
}
|
||||||
@@ -155,13 +166,19 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
public String getUnlocalizedName( ItemStack is )
|
public String getUnlocalizedName( ItemStack is )
|
||||||
{
|
{
|
||||||
if( is.getItemDamage() == 1 )
|
if( is.getItemDamage() == 1 )
|
||||||
|
{
|
||||||
return this.getUnlocalizedName() + ".Block";
|
return this.getUnlocalizedName() + ".Block";
|
||||||
|
}
|
||||||
|
|
||||||
if( is.getItemDamage() == 2 )
|
if( is.getItemDamage() == 2 )
|
||||||
|
{
|
||||||
return this.getUnlocalizedName() + ".Brick";
|
return this.getUnlocalizedName() + ".Brick";
|
||||||
|
}
|
||||||
|
|
||||||
if( is.getItemDamage() == 3 )
|
if( is.getItemDamage() == 3 )
|
||||||
|
{
|
||||||
return this.getUnlocalizedName() + ".SmallBrick";
|
return this.getUnlocalizedName() + ".SmallBrick";
|
||||||
|
}
|
||||||
|
|
||||||
return this.getUnlocalizedName();
|
return this.getUnlocalizedName();
|
||||||
}
|
}
|
||||||
@@ -181,11 +198,17 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
public IIcon getIcon( int direction, int metadata )
|
public IIcon getIcon( int direction, int metadata )
|
||||||
{
|
{
|
||||||
if( metadata == 1 )
|
if( metadata == 1 )
|
||||||
|
{
|
||||||
return this.Block;
|
return this.Block;
|
||||||
|
}
|
||||||
if( metadata == 2 )
|
if( metadata == 2 )
|
||||||
|
{
|
||||||
return this.Brick;
|
return this.Brick;
|
||||||
|
}
|
||||||
if( metadata == 3 )
|
if( metadata == 3 )
|
||||||
|
{
|
||||||
return this.SmallBrick;
|
return this.SmallBrick;
|
||||||
|
}
|
||||||
return super.getIcon( direction, metadata );
|
return super.getIcon( direction, metadata );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,6 +234,8 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||||||
{
|
{
|
||||||
super.breakBlock( w, x, y, z, b, WTF );
|
super.breakBlock( w, x, y, z, b, WTF );
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,12 @@ public class OreQuartz extends AEBaseBlock
|
|||||||
public OreQuartz( Class<? extends OreQuartz> self )
|
public OreQuartz( Class<? extends OreQuartz> self )
|
||||||
{
|
{
|
||||||
super( self, Material.rock );
|
super( self, Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
|
||||||
this.setHardness( 3.0F );
|
this.setHardness( 3.0F );
|
||||||
this.setResistance( 5.0F );
|
this.setResistance( 5.0F );
|
||||||
this.boostBrightnessLow = 0;
|
this.boostBrightnessLow = 0;
|
||||||
this.boostBrightnessHigh = 1;
|
this.boostBrightnessHigh = 1;
|
||||||
this.enhanceBrightness = false;
|
this.enhanceBrightness = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -91,7 +91,9 @@ public class OreQuartz extends AEBaseBlock
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( j1 > 15 )
|
if( j1 > 15 )
|
||||||
|
{
|
||||||
j1 = 15;
|
j1 = 15;
|
||||||
|
}
|
||||||
return j1 << 20 | j1 << 4;
|
return j1 << 20 | j1 << 4;
|
||||||
}
|
}
|
||||||
return j1;
|
return j1;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ package appeng.block.solids;
|
|||||||
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -76,7 +75,9 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if ( !AEConfig.instance.enableEffects )
|
if ( !AEConfig.instance.enableEffects )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
double xOff = ( r.nextFloat() );
|
double xOff = ( r.nextFloat() );
|
||||||
double yOff = ( r.nextFloat() );
|
double yOff = ( r.nextFloat() );
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockMatrixFrame()
|
public BlockMatrixFrame()
|
||||||
{
|
{
|
||||||
super( BlockMatrixFrame.class, Material.anvil );
|
super( BlockMatrixFrame.class, Material.anvil );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
|
||||||
this.setResistance( 6000000.0F );
|
this.setResistance( 6000000.0F );
|
||||||
this.setBlockUnbreakable();
|
this.setBlockUnbreakable();
|
||||||
this.setLightOpacity( 0 );
|
this.setLightOpacity( 0 );
|
||||||
this.isOpaque = false;
|
this.isOpaque = false;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
|||||||
public BlockSpatialIOPort()
|
public BlockSpatialIOPort()
|
||||||
{
|
{
|
||||||
super( BlockSpatialIOPort.class, Material.iron );
|
super( BlockSpatialIOPort.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
|
||||||
this.setTileEntity( TileSpatialIOPort.class );
|
this.setTileEntity( TileSpatialIOPort.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -49,20 +49,26 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileSpatialIOPort te = this.getTileEntity( w, x, y, z );
|
TileSpatialIOPort te = this.getTileEntity( w, x, y, z );
|
||||||
if( te != null )
|
if( te != null )
|
||||||
|
{
|
||||||
te.updateRedstoneState();
|
te.updateRedstoneState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileSpatialIOPort tg = this.getTileEntity( w, x, y, z );
|
TileSpatialIOPort tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ public class BlockSpatialPylon extends AEBaseBlock
|
|||||||
public BlockSpatialPylon()
|
public BlockSpatialPylon()
|
||||||
{
|
{
|
||||||
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
super( BlockSpatialPylon.class, AEGlassMaterial.INSTANCE );
|
||||||
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
|
||||||
this.setTileEntity( TileSpatialPylon.class );
|
this.setTileEntity( TileSpatialPylon.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.SpatialIO ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -48,7 +48,9 @@ public class BlockSpatialPylon extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||||
if( tsp != null )
|
if( tsp != null )
|
||||||
|
{
|
||||||
tsp.onNeighborBlockChange();
|
tsp.onNeighborBlockChange();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -56,7 +58,9 @@ public class BlockSpatialPylon extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||||
if( tsp != null )
|
if( tsp != null )
|
||||||
|
{
|
||||||
return tsp.getLightValue();
|
return tsp.getLightValue();
|
||||||
|
}
|
||||||
return super.getLightValue( w, x, y, z );
|
return super.getLightValue( w, x, y, z );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ public class BlockChest extends AEBaseBlock
|
|||||||
public BlockChest()
|
public BlockChest()
|
||||||
{
|
{
|
||||||
super( BlockChest.class, Material.iron );
|
super( BlockChest.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
|
|
||||||
this.setTileEntity( TileChest.class );
|
this.setTileEntity( TileChest.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEChest ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -62,7 +62,9 @@ public class BlockChest extends AEBaseBlock
|
|||||||
if( tg != null && !p.isSneaking() )
|
if( tg != null && !p.isSneaking() )
|
||||||
{
|
{
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if( side != tg.getUp().ordinal() )
|
if( side != tg.getUp().ordinal() )
|
||||||
{
|
{
|
||||||
@@ -78,7 +80,9 @@ public class BlockChest extends AEBaseBlock
|
|||||||
tg.openGui( p, ch, cell, side );
|
tg.openGui( p, ch, cell, side );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
p.addChatMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
|
p.addChatMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class BlockDrive extends AEBaseBlock
|
|||||||
public BlockDrive()
|
public BlockDrive()
|
||||||
{
|
{
|
||||||
super( BlockDrive.class, Material.iron );
|
super( BlockDrive.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
|
|
||||||
this.setTileEntity( TileDrive.class );
|
this.setTileEntity( TileDrive.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.MEDrive ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -55,13 +55,17 @@ public class BlockDrive extends AEBaseBlock
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileDrive tg = this.getTileEntity( w, x, y, z );
|
TileDrive tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_DRIVE );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_DRIVE );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ public class BlockIOPort extends AEBaseBlock
|
|||||||
public BlockIOPort()
|
public BlockIOPort()
|
||||||
{
|
{
|
||||||
super( BlockIOPort.class, Material.iron );
|
super( BlockIOPort.class, Material.iron );
|
||||||
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
|
||||||
this.setTileEntity( TileIOPort.class );
|
this.setTileEntity( TileIOPort.class );
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.StorageCells, AEFeature.IOPort ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -49,20 +49,26 @@ public class BlockIOPort extends AEBaseBlock
|
|||||||
{
|
{
|
||||||
TileIOPort te = this.getTileEntity( w, x, y, z );
|
TileIOPort te = this.getTileEntity( w, x, y, z );
|
||||||
if( te != null )
|
if( te != null )
|
||||||
|
{
|
||||||
te.updateRedstoneState();
|
te.updateRedstoneState();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( p.isSneaking() )
|
if( p.isSneaking() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
TileIOPort tg = this.getTileEntity( w, x, y, z );
|
TileIOPort tg = this.getTileEntity( w, x, y, z );
|
||||||
if( tg != null )
|
if( tg != null )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_IOPORT );
|
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_IOPORT );
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||||||
public BlockSkyChest()
|
public BlockSkyChest()
|
||||||
{
|
{
|
||||||
super( BlockSkyChest.class, Material.rock );
|
super( BlockSkyChest.class, Material.rock );
|
||||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
|
|
||||||
this.setTileEntity( TileSkyChest.class );
|
this.setTileEntity( TileSkyChest.class );
|
||||||
this.isOpaque = this.isFullSize = false;
|
this.isOpaque = this.isFullSize = false;
|
||||||
this.lightOpacity = 0;
|
this.lightOpacity = 0;
|
||||||
this.hasSubtypes = true;
|
this.hasSubtypes = true;
|
||||||
this.setHardness( 50 );
|
this.setHardness( 50 );
|
||||||
this.blockResistance = 150.0f;
|
this.blockResistance = 150.0f;
|
||||||
|
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -104,7 +104,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
Platform.openGUI( player, this.getTileEntity( w, x, y, z ), ForgeDirection.getOrientation( side ), GuiBridge.GUI_SKYCHEST );
|
Platform.openGUI( player, this.getTileEntity( w, x, y, z ), ForgeDirection.getOrientation( side ), GuiBridge.GUI_SKYCHEST );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -127,7 +129,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||||||
public String getUnlocalizedName( ItemStack is )
|
public String getUnlocalizedName( ItemStack is )
|
||||||
{
|
{
|
||||||
if( is.getItemDamage() == 1 )
|
if( is.getItemDamage() == 1 )
|
||||||
|
{
|
||||||
return this.getUnlocalizedName() + ".Block";
|
return this.getUnlocalizedName() + ".Block";
|
||||||
|
}
|
||||||
|
|
||||||
return this.getUnlocalizedName();
|
return this.getUnlocalizedName();
|
||||||
}
|
}
|
||||||
@@ -140,7 +144,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
|||||||
ForgeDirection o = ForgeDirection.UNKNOWN;
|
ForgeDirection o = ForgeDirection.UNKNOWN;
|
||||||
|
|
||||||
if( sk != null )
|
if( sk != null )
|
||||||
|
{
|
||||||
o = sk.getUp();
|
o = sk.getUp();
|
||||||
|
}
|
||||||
|
|
||||||
double X = o.offsetX == 0 ? 0.06 : 0.0;
|
double X = o.offsetX == 0 ? 0.06 : 0.0;
|
||||||
double Y = o.offsetY == 0 ? 0.06 : 0.0;
|
double Y = o.offsetY == 0 ? 0.06 : 0.0;
|
||||||
|
|||||||
@@ -119,9 +119,13 @@ public class ClientHelper extends ServerHelper
|
|||||||
public World getWorld()
|
public World getWorld()
|
||||||
{
|
{
|
||||||
if( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
|
{
|
||||||
return Minecraft.getMinecraft().theWorld;
|
return Minecraft.getMinecraft().theWorld;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return super.getWorld();
|
return super.getWorld();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -129,7 +133,9 @@ public class ClientHelper extends ServerHelper
|
|||||||
{
|
{
|
||||||
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
||||||
if( bbr.hasTESR() && tile != null )
|
if( bbr.hasTESR() && tile != null )
|
||||||
|
{
|
||||||
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
|
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -142,7 +148,9 @@ public class ClientHelper extends ServerHelper
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
return super.getPlayers();
|
return super.getPlayers();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -243,9 +251,13 @@ public class ClientHelper extends ServerHelper
|
|||||||
{
|
{
|
||||||
int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
||||||
if( setting == 2 )
|
if( setting == 2 )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
if( setting == 0 )
|
if( setting == 0 )
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
return r.nextInt( 2 * ( setting + 1 ) ) == 0;
|
return r.nextInt( 2 * ( setting + 1 ) ) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,7 +359,9 @@ public class ClientHelper extends ServerHelper
|
|||||||
public CableRenderMode getRenderMode()
|
public CableRenderMode getRenderMode()
|
||||||
{
|
{
|
||||||
if( Platform.isServer() )
|
if( Platform.isServer() )
|
||||||
|
{
|
||||||
return super.getRenderMode();
|
return super.getRenderMode();
|
||||||
|
}
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
EntityPlayer player = mc.thePlayer;
|
EntityPlayer player = mc.thePlayer;
|
||||||
@@ -360,13 +374,12 @@ public class ClientHelper extends ServerHelper
|
|||||||
{
|
{
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
|
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EntityPlayer player = mc.thePlayer;
|
EntityPlayer player = mc.thePlayer;
|
||||||
|
|
||||||
if( player == null )
|
|
||||||
return;
|
|
||||||
|
|
||||||
int x = (int) player.posX;
|
int x = (int) player.posX;
|
||||||
int y = (int) player.posY;
|
int y = (int) player.posY;
|
||||||
int z = (int) player.posZ;
|
int z = (int) player.posZ;
|
||||||
@@ -386,7 +399,9 @@ public class ClientHelper extends ServerHelper
|
|||||||
public void wheelEvent( MouseEvent me )
|
public void wheelEvent( MouseEvent me )
|
||||||
{
|
{
|
||||||
if( me.isCanceled() || me.dwheel == 0 )
|
if( me.isCanceled() || me.dwheel == 0 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
EntityPlayer player = mc.thePlayer;
|
EntityPlayer player = mc.thePlayer;
|
||||||
@@ -412,16 +427,22 @@ public class ClientHelper extends ServerHelper
|
|||||||
if( ev.map.getTextureType() == 1 )
|
if( ev.map.getTextureType() == 1 )
|
||||||
{
|
{
|
||||||
for( ExtraItemTextures et : ExtraItemTextures.values() )
|
for( ExtraItemTextures et : ExtraItemTextures.values() )
|
||||||
|
{
|
||||||
et.registerIcon( ev.map );
|
et.registerIcon( ev.map );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ev.map.getTextureType() == 0 )
|
if( ev.map.getTextureType() == 0 )
|
||||||
{
|
{
|
||||||
for( ExtraBlockTextures et : ExtraBlockTextures.values() )
|
for( ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||||
|
{
|
||||||
et.registerIcon( ev.map );
|
et.registerIcon( ev.map );
|
||||||
|
}
|
||||||
|
|
||||||
for( CableBusTextures cb : CableBusTextures.values() )
|
for( CableBusTextures cb : CableBusTextures.values() )
|
||||||
|
{
|
||||||
cb.registerIcon( ev.map );
|
cb.registerIcon( ev.map );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,6 @@ import appeng.core.sync.packets.PacketSwapSlots;
|
|||||||
import appeng.helpers.InventoryAction;
|
import appeng.helpers.InventoryAction;
|
||||||
import appeng.integration.IntegrationType;
|
import appeng.integration.IntegrationType;
|
||||||
import appeng.integration.abstraction.INEI;
|
import appeng.integration.abstraction.INEI;
|
||||||
import appeng.util.Platform;
|
|
||||||
|
|
||||||
|
|
||||||
public abstract class AEBaseGui extends GuiContainer
|
public abstract class AEBaseGui extends GuiContainer
|
||||||
@@ -137,11 +136,17 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final List<Slot> slots = this.getInventorySlots();
|
final List<Slot> slots = this.getInventorySlots();
|
||||||
Iterator<Slot> i = slots.iterator();
|
Iterator<Slot> i = slots.iterator();
|
||||||
while( i.hasNext() )
|
while( i.hasNext() )
|
||||||
|
{
|
||||||
if( i.next() instanceof SlotME )
|
if( i.next() instanceof SlotME )
|
||||||
|
{
|
||||||
i.remove();
|
i.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for( InternalSlotME me : this.meSlots )
|
for( InternalSlotME me : this.meSlots )
|
||||||
|
{
|
||||||
slots.add( new SlotME( me ) );
|
slots.add( new SlotME( me ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings( "unchecked" )
|
@SuppressWarnings( "unchecked" )
|
||||||
@@ -157,7 +162,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
|
|
||||||
boolean hasClicked = Mouse.isButtonDown( 0 );
|
boolean hasClicked = Mouse.isButtonDown( 0 );
|
||||||
if( hasClicked && this.myScrollBar != null )
|
if( hasClicked && this.myScrollBar != null )
|
||||||
|
{
|
||||||
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
|
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
|
||||||
|
}
|
||||||
|
|
||||||
for( Object c : this.buttonList )
|
for( Object c : this.buttonList )
|
||||||
{
|
{
|
||||||
@@ -172,11 +179,15 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
if( y < mouse_y && y + tooltip.getHeight() > mouse_y )
|
if( y < mouse_y && y + tooltip.getHeight() > mouse_y )
|
||||||
{
|
{
|
||||||
if( y < 15 )
|
if( y < 15 )
|
||||||
|
{
|
||||||
y = 15;
|
y = 15;
|
||||||
|
}
|
||||||
|
|
||||||
String msg = tooltip.getMessage();
|
String msg = tooltip.getMessage();
|
||||||
if( msg != null )
|
if( msg != null )
|
||||||
|
{
|
||||||
this.drawTooltip( x + 11, y + 4, 0, msg );
|
this.drawTooltip( x + 11, y + 4, 0, msg );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,7 +234,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( forceWidth > 0 )
|
if( forceWidth > 0 )
|
||||||
|
{
|
||||||
var5 = forceWidth;
|
var5 = forceWidth;
|
||||||
|
}
|
||||||
|
|
||||||
this.zLevel = 300.0F;
|
this.zLevel = 300.0F;
|
||||||
itemRender.zLevel = 300.0F;
|
itemRender.zLevel = 300.0F;
|
||||||
@@ -270,14 +283,16 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final protected void drawGuiContainerForegroundLayer( int x, int y )
|
protected final void drawGuiContainerForegroundLayer( int x, int y )
|
||||||
{
|
{
|
||||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||||
int oy = this.guiTop; // (height - ySize) / 2;
|
int oy = this.guiTop; // (height - ySize) / 2;
|
||||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||||
|
|
||||||
if( this.myScrollBar != null )
|
if( this.myScrollBar != null )
|
||||||
|
{
|
||||||
this.myScrollBar.draw( this );
|
this.myScrollBar.draw( this );
|
||||||
|
}
|
||||||
|
|
||||||
this.drawFG( ox, oy, x, y );
|
this.drawFG( ox, oy, x, y );
|
||||||
}
|
}
|
||||||
@@ -285,7 +300,7 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
public abstract void drawFG( int offsetX, int offsetY, int mouseX, int mouseY );
|
public abstract void drawFG( int offsetX, int offsetY, int mouseX, int mouseY );
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
final protected void drawGuiContainerBackgroundLayer( float f, int x, int y )
|
protected final void drawGuiContainerBackgroundLayer( float f, int x, int y )
|
||||||
{
|
{
|
||||||
int ox = this.guiLeft; // (width - xSize) / 2;
|
int ox = this.guiLeft; // (width - xSize) / 2;
|
||||||
int oy = this.guiTop; // (height - ySize) / 2;
|
int oy = this.guiTop; // (height - ySize) / 2;
|
||||||
@@ -358,7 +373,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
super.mouseClickMove( x, y, c, d );
|
super.mouseClickMove( x, y, c, d );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -371,7 +388,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||||
|
|
||||||
if( this.drag_click.size() > 1 )
|
if( this.drag_click.size() > 1 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||||
NetworkHandler.instance.sendToServer( p );
|
NetworkHandler.instance.sendToServer( p );
|
||||||
@@ -382,7 +401,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
if( slot instanceof SlotPatternTerm )
|
if( slot instanceof SlotPatternTerm )
|
||||||
{
|
{
|
||||||
if( key == 6 )
|
if( key == 6 )
|
||||||
|
{
|
||||||
return; // prevent weird double clicks..
|
return; // prevent weird double clicks..
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -396,13 +417,19 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
else if( slot instanceof SlotCraftingTerm )
|
else if( slot instanceof SlotCraftingTerm )
|
||||||
{
|
{
|
||||||
if( key == 6 )
|
if( key == 6 )
|
||||||
|
{
|
||||||
return; // prevent weird double clicks..
|
return; // prevent weird double clicks..
|
||||||
|
}
|
||||||
|
|
||||||
InventoryAction action = null;
|
InventoryAction action = null;
|
||||||
if( key == 1 )
|
if( key == 1 )
|
||||||
|
{
|
||||||
action = InventoryAction.CRAFT_SHIFT;
|
action = InventoryAction.CRAFT_SHIFT;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||||
|
}
|
||||||
|
|
||||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||||
NetworkHandler.instance.sendToServer( p );
|
NetworkHandler.instance.sendToServer( p );
|
||||||
@@ -416,12 +443,16 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
{
|
{
|
||||||
IAEItemStack stack = null;
|
IAEItemStack stack = null;
|
||||||
if( slot instanceof SlotME )
|
if( slot instanceof SlotME )
|
||||||
|
{
|
||||||
stack = ( (SlotME) slot ).getAEStack();
|
stack = ( (SlotME) slot ).getAEStack();
|
||||||
|
}
|
||||||
|
|
||||||
int slotNum = this.getInventorySlots().size();
|
int slotNum = this.getInventorySlots().size();
|
||||||
|
|
||||||
if( !( slot instanceof SlotME ) && slot != null )
|
if( !( slot instanceof SlotME ) && slot != null )
|
||||||
|
{
|
||||||
slotNum = slot.slotNumber;
|
slotNum = slot.slotNumber;
|
||||||
|
}
|
||||||
|
|
||||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||||
@@ -478,7 +509,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
stack = ( (SlotME) slot ).getAEStack();
|
stack = ( (SlotME) slot ).getAEStack();
|
||||||
|
|
||||||
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||||
|
{
|
||||||
action = InventoryAction.AUTO_CRAFT;
|
action = InventoryAction.AUTO_CRAFT;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@@ -490,8 +523,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
|
|
||||||
stack = ( (SlotME) slot ).getAEStack();
|
stack = ( (SlotME) slot ).getAEStack();
|
||||||
if( stack != null && stack.isCraftable() )
|
if( stack != null && stack.isCraftable() )
|
||||||
|
{
|
||||||
action = InventoryAction.AUTO_CRAFT;
|
action = InventoryAction.AUTO_CRAFT;
|
||||||
|
}
|
||||||
else if( player.capabilities.isCreativeMode )
|
else if( player.capabilities.isCreativeMode )
|
||||||
{
|
{
|
||||||
IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
|
IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
|
||||||
@@ -527,9 +561,13 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
this.bl_clicked = slot;
|
this.bl_clicked = slot;
|
||||||
this.dbl_clickTimer = Stopwatch.createStarted();
|
this.dbl_clickTimer = Stopwatch.createStarted();
|
||||||
if( slot != null )
|
if( slot != null )
|
||||||
|
{
|
||||||
this.dbl_whichItem = slot.getHasStack() ? slot.getStack().copy() : null;
|
this.dbl_whichItem = slot.getHasStack() ? slot.getStack().copy() : null;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.dbl_whichItem = null;
|
this.dbl_whichItem = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( this.dbl_whichItem != null )
|
else if( this.dbl_whichItem != null )
|
||||||
{
|
{
|
||||||
@@ -643,7 +681,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
this.mouseWheelEvent( x, y, i / Math.abs( i ) );
|
this.mouseWheelEvent( x, y, i / Math.abs( i ) );
|
||||||
}
|
}
|
||||||
else if( i != 0 && this.myScrollBar != null )
|
else if( i != 0 && this.myScrollBar != null )
|
||||||
|
{
|
||||||
this.myScrollBar.wheel( i );
|
this.myScrollBar.wheel( i );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void mouseWheelEvent( int x, int y, int wheel )
|
protected void mouseWheelEvent( int x, int y, int wheel )
|
||||||
@@ -703,7 +743,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
private boolean hasCustomInventoryName()
|
private boolean hasCustomInventoryName()
|
||||||
{
|
{
|
||||||
if( this.inventorySlots instanceof AEBaseContainer )
|
if( this.inventorySlots instanceof AEBaseContainer )
|
||||||
|
{
|
||||||
return ( (AEBaseContainer) this.inventorySlots ).customName != null;
|
return ( (AEBaseContainer) this.inventorySlots ).customName != null;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -744,8 +786,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
catch( Exception err )
|
catch( Exception err )
|
||||||
{
|
{
|
||||||
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
|
AELog.warning( "[AppEng] AE prevented crash while drawing slot: " + err.toString() );
|
||||||
if( Platform.isDrawing( Tessellator.instance ) )
|
|
||||||
Tessellator.instance.draw();
|
|
||||||
}
|
}
|
||||||
this.setItemRender( pIR );
|
this.setItemRender( pIR );
|
||||||
return;
|
return;
|
||||||
@@ -794,8 +834,6 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
}
|
}
|
||||||
catch( Exception err )
|
catch( Exception err )
|
||||||
{
|
{
|
||||||
if( Platform.isDrawing( tessellator ) )
|
|
||||||
tessellator.draw();
|
|
||||||
}
|
}
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
}
|
}
|
||||||
@@ -840,7 +878,9 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
this.safeDrawSlot( s );
|
this.safeDrawSlot( s );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.safeDrawSlot( s );
|
this.safeDrawSlot( s );
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -876,15 +916,10 @@ public abstract class AEBaseGui extends GuiContainer
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// drawSlotInventory
|
|
||||||
// super.func_146977_a( s );r
|
|
||||||
GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s );
|
GuiContainer.class.getDeclaredMethod( "func_146977_a_original", Slot.class ).invoke( this, s );
|
||||||
}
|
}
|
||||||
catch( Exception err )
|
catch( Exception err )
|
||||||
{
|
{
|
||||||
Tessellator tessellator = Tessellator.instance;
|
|
||||||
if( Platform.isDrawing( tessellator ) )
|
|
||||||
tessellator.draw();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import appeng.api.storage.data.IAEItemStack;
|
import appeng.api.storage.data.IAEItemStack;
|
||||||
import appeng.client.me.SlotME;
|
import appeng.client.me.SlotME;
|
||||||
import appeng.core.AEConfig;
|
import appeng.core.AEConfig;
|
||||||
|
import appeng.core.localization.ButtonToolTips;
|
||||||
|
|
||||||
|
|
||||||
public abstract class AEBaseMEGui extends AEBaseGui
|
public abstract class AEBaseMEGui extends AEBaseGui
|
||||||
@@ -63,14 +64,30 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||||||
if( myStack != null )
|
if( myStack != null )
|
||||||
{
|
{
|
||||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
{
|
||||||
|
final String local = ButtonToolTips.ItemsStored.getLocal();
|
||||||
|
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() );
|
||||||
|
final String format = String.format( local, formattedAmount );
|
||||||
|
|
||||||
|
currentToolTip.add( "\u00a77" + format );
|
||||||
|
}
|
||||||
|
|
||||||
if( myStack.getCountRequestable() > 0 )
|
if( myStack.getCountRequestable() > 0 )
|
||||||
currentToolTip.add( "\u00a77Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
{
|
||||||
|
final String local = ButtonToolTips.ItemsRequestable.getLocal();
|
||||||
|
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() );
|
||||||
|
final String format = String.format( local, formattedAmount );
|
||||||
|
|
||||||
|
currentToolTip.add( "\u00a77" + format );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
|
else if( stack.stackSize > BigNumber || ( stack.stackSize > 1 && stack.isItemDamaged() ) )
|
||||||
{
|
{
|
||||||
currentToolTip.add( "\u00a77Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize ) );
|
final String local = ButtonToolTips.ItemsStored.getLocal();
|
||||||
|
final String formattedAmount = NumberFormat.getNumberInstance( Locale.US ).format( stack.stackSize );
|
||||||
|
final String format = String.format( local, formattedAmount );
|
||||||
|
|
||||||
|
currentToolTip.add( "\u00a77" + format );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,10 +121,14 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
|||||||
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||||
|
|
||||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||||
|
{
|
||||||
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( myStack.getCountRequestable() > 0 )
|
if( myStack.getCountRequestable() > 0 )
|
||||||
|
{
|
||||||
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||||
|
}
|
||||||
|
|
||||||
this.drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
this.drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,15 +48,21 @@ public class AEConfigGui extends GuiConfig
|
|||||||
for( String cat : AEConfig.instance.getCategoryNames() )
|
for( String cat : AEConfig.instance.getCategoryNames() )
|
||||||
{
|
{
|
||||||
if( cat.equals( "versionchecker" ) )
|
if( cat.equals( "versionchecker" ) )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if( cat.equals( "settings" ) )
|
if( cat.equals( "settings" ) )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ConfigCategory cc = AEConfig.instance.getCategory( cat );
|
ConfigCategory cc = AEConfig.instance.getCategory( cat );
|
||||||
|
|
||||||
if( cc.isChild() )
|
if( cc.isChild() )
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
ConfigElement ce = new ConfigElement( cc );
|
ConfigElement ce = new ConfigElement( cc );
|
||||||
list.add( ce );
|
list.add( ce );
|
||||||
|
|||||||
@@ -98,9 +98,13 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||||||
int dx = this.workbench.availableUpgrades() - 8;
|
int dx = this.workbench.availableUpgrades() - 8;
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||||
if( dx == 8 )
|
if( dx == 8 )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -113,13 +117,19 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||||||
int dx = this.workbench.availableUpgrades() - 16;
|
int dx = this.workbench.availableUpgrades() - 16;
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||||
if( dx == 8 )
|
if( dx == 8 )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
this.drawTexturedModalRect( offsetX + 177 + 27 + 18 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( this.hasToolbox() )
|
if( this.hasToolbox() )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, 161, 68, 68 );
|
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, 161, 68, 68 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -135,7 +145,9 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||||||
if( is != null && is.getItem() instanceof IUpgradeModule )
|
if( is != null && is.getItem() instanceof IUpgradeModule )
|
||||||
{
|
{
|
||||||
if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY )
|
if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY )
|
||||||
|
{
|
||||||
hasFuzzy = true;
|
hasFuzzy = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.fuzzyMode.setVisibility( hasFuzzy );
|
this.fuzzyMode.setVisibility( hasFuzzy );
|
||||||
@@ -186,7 +198,9 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
|||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
super.actionPerformed( btn );
|
super.actionPerformed( btn );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( IOException ignored )
|
catch( IOException ignored )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -197,10 +197,14 @@ public class GuiCraftAmount extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( fixed )
|
if( fixed )
|
||||||
|
{
|
||||||
this.amountToCraft.setText( out );
|
this.amountToCraft.setText( out );
|
||||||
|
}
|
||||||
|
|
||||||
if( out.length() == 0 )
|
if( out.length() == 0 )
|
||||||
|
{
|
||||||
out = "0";
|
out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
long result = Long.parseLong( out );
|
long result = Long.parseLong( out );
|
||||||
if( result < 0 )
|
if( result < 0 )
|
||||||
@@ -248,7 +252,9 @@ public class GuiCraftAmount extends AEBaseGui
|
|||||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||||
|
|
||||||
if( isPlus || isMinus )
|
if( isPlus || isMinus )
|
||||||
|
{
|
||||||
this.addQty( this.getQty( btn ) );
|
this.addQty( this.getQty( btn ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addQty( int i )
|
private void addQty( int i )
|
||||||
@@ -265,19 +271,27 @@ public class GuiCraftAmount extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( fixed )
|
if( fixed )
|
||||||
|
{
|
||||||
this.amountToCraft.setText( out );
|
this.amountToCraft.setText( out );
|
||||||
|
}
|
||||||
|
|
||||||
if( out.length() == 0 )
|
if( out.length() == 0 )
|
||||||
|
{
|
||||||
out = "0";
|
out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
long result = Integer.parseInt( out );
|
long result = Integer.parseInt( out );
|
||||||
|
|
||||||
if( result == 1 && i > 1 )
|
if( result == 1 && i > 1 )
|
||||||
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
|
}
|
||||||
|
|
||||||
result += i;
|
result += i;
|
||||||
if( result < 1 )
|
if( result < 1 )
|
||||||
|
{
|
||||||
result = 1;
|
result = 1;
|
||||||
|
}
|
||||||
|
|
||||||
out = Long.toString( result );
|
out = Long.toString( result );
|
||||||
Integer.parseInt( out );
|
Integer.parseInt( out );
|
||||||
|
|||||||
@@ -84,16 +84,24 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
this.ccc = (ContainerCraftConfirm) this.inventorySlots;
|
this.ccc = (ContainerCraftConfirm) this.inventorySlots;
|
||||||
|
|
||||||
if( te instanceof WirelessTerminalGuiObject )
|
if( te instanceof WirelessTerminalGuiObject )
|
||||||
|
{
|
||||||
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||||
|
}
|
||||||
|
|
||||||
if( te instanceof PartTerminal )
|
if( te instanceof PartTerminal )
|
||||||
|
{
|
||||||
this.OriginalGui = GuiBridge.GUI_ME;
|
this.OriginalGui = GuiBridge.GUI_ME;
|
||||||
|
}
|
||||||
|
|
||||||
if( te instanceof PartCraftingTerminal )
|
if( te instanceof PartCraftingTerminal )
|
||||||
|
{
|
||||||
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||||
|
}
|
||||||
|
|
||||||
if( te instanceof PartPatternTerminal )
|
if( te instanceof PartPatternTerminal )
|
||||||
|
{
|
||||||
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isAutoStart()
|
boolean isAutoStart()
|
||||||
@@ -115,7 +123,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
this.buttonList.add( this.selectCPU );
|
this.buttonList.add( this.selectCPU );
|
||||||
|
|
||||||
if( this.OriginalGui != null )
|
if( this.OriginalGui != null )
|
||||||
|
{
|
||||||
this.cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
this.cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||||
|
}
|
||||||
|
|
||||||
this.buttonList.add( this.cancel );
|
this.buttonList.add( this.cancel );
|
||||||
}
|
}
|
||||||
@@ -174,11 +184,15 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
|
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.selectedCpu;
|
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.selectedCpu;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.ccc.noCPU )
|
if( this.ccc.noCPU )
|
||||||
|
{
|
||||||
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
||||||
|
}
|
||||||
|
|
||||||
this.selectCPU.displayString = btnTextText;
|
this.selectCPU.displayString = btnTextText;
|
||||||
}
|
}
|
||||||
@@ -199,9 +213,13 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
String dsp = null;
|
String dsp = null;
|
||||||
|
|
||||||
if( this.isSimulation() )
|
if( this.isSimulation() )
|
||||||
|
{
|
||||||
dsp = GuiText.Simulation.getLocal();
|
dsp = GuiText.Simulation.getLocal();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
|
dsp = this.ccc.cpuBytesAvail > 0 ? ( GuiText.Bytes.getLocal() + ": " + this.ccc.cpuBytesAvail + " : " + GuiText.CoProcessors.getLocal() + ": " + this.ccc.cpuCoProcessors ) : GuiText.Bytes.getLocal() + ": N/A : " + GuiText.CoProcessors.getLocal() + ": N/A";
|
||||||
|
}
|
||||||
|
|
||||||
int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
|
int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
|
||||||
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
||||||
@@ -237,11 +255,17 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
int lines = 0;
|
int lines = 0;
|
||||||
|
|
||||||
if( stored != null && stored.getStackSize() > 0 )
|
if( stored != null && stored.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
}
|
||||||
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
}
|
||||||
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||||
|
{
|
||||||
lines++;
|
lines++;
|
||||||
|
}
|
||||||
|
|
||||||
int negY = ( ( lines - 1 ) * 5 ) / 2;
|
int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||||
int downY = 0;
|
int downY = 0;
|
||||||
@@ -251,16 +275,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
{
|
{
|
||||||
String str = Long.toString( stored.getStackSize() );
|
String str = Long.toString( stored.getStackSize() );
|
||||||
if( stored.getStackSize() >= 10000 )
|
if( stored.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( stored.getStackSize() >= 10000000 )
|
if( stored.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||||
|
}
|
||||||
|
|
||||||
downY += 5;
|
downY += 5;
|
||||||
}
|
}
|
||||||
@@ -269,16 +299,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
{
|
{
|
||||||
String str = Long.toString( missingStack.getStackSize() );
|
String str = Long.toString( missingStack.getStackSize() );
|
||||||
if( missingStack.getStackSize() >= 10000 )
|
if( missingStack.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( missingStack.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( missingStack.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( missingStack.getStackSize() >= 10000000 )
|
if( missingStack.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( missingStack.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( missingStack.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.Missing.getLocal() + ": " + str;
|
str = GuiText.Missing.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
|
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
|
||||||
|
}
|
||||||
|
|
||||||
red = true;
|
red = true;
|
||||||
downY += 5;
|
downY += 5;
|
||||||
@@ -288,16 +324,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
{
|
{
|
||||||
String str = Long.toString( pendingStack.getStackSize() );
|
String str = Long.toString( pendingStack.getStackSize() );
|
||||||
if( pendingStack.getStackSize() >= 10000 )
|
if( pendingStack.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( pendingStack.getStackSize() >= 10000000 )
|
if( pendingStack.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
@@ -311,7 +353,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
dspToolTip = Platform.getItemDisplayName( is );
|
dspToolTip = Platform.getItemDisplayName( is );
|
||||||
|
|
||||||
if( lineList.size() > 0 )
|
if( lineList.size() > 0 )
|
||||||
|
{
|
||||||
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
||||||
|
}
|
||||||
|
|
||||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||||
toolPosY = y * offY + yo;
|
toolPosY = y * offY + yo;
|
||||||
@@ -366,17 +410,23 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.storage, l );
|
this.handleInput( this.storage, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.pending, l );
|
this.handleInput( this.pending, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.missing, l );
|
this.handleInput( this.missing, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -385,7 +435,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
long amt = this.getTotal( l );
|
long amt = this.getTotal( l );
|
||||||
|
|
||||||
if( amt <= 0 )
|
if( amt <= 0 )
|
||||||
|
{
|
||||||
this.deleteVisualStack( l );
|
this.deleteVisualStack( l );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IAEItemStack is = this.findVisualStack( l );
|
IAEItemStack is = this.findVisualStack( l );
|
||||||
@@ -403,7 +455,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
if( l.getStackSize() <= 0 )
|
if( l.getStackSize() <= 0 )
|
||||||
{
|
{
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
a.reset();
|
a.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -414,7 +468,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
a.setStackSize( l.getStackSize() );
|
a.setStackSize( l.getStackSize() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -427,13 +483,19 @@ public class GuiCraftConfirm extends AEBaseGui
|
|||||||
long total = 0;
|
long total = 0;
|
||||||
|
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
total += a.getStackSize();
|
total += a.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
if( c != null )
|
if( c != null )
|
||||||
|
{
|
||||||
total += c.getStackSize();
|
total += c.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
if( m != null )
|
if( m != null )
|
||||||
|
{
|
||||||
total += m.getStackSize();
|
total += m.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,16 +228,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
{
|
{
|
||||||
String str = Long.toString( stored.getStackSize() );
|
String str = Long.toString( stored.getStackSize() );
|
||||||
if( stored.getStackSize() >= 10000 )
|
if( stored.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( stored.getStackSize() >= 10000000 )
|
if( stored.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.Stored.getLocal() + ": " + str;
|
str = GuiText.Stored.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||||
|
}
|
||||||
|
|
||||||
downY += 5;
|
downY += 5;
|
||||||
}
|
}
|
||||||
@@ -246,16 +252,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
{
|
{
|
||||||
String str = Long.toString( activeStack.getStackSize() );
|
String str = Long.toString( activeStack.getStackSize() );
|
||||||
if( activeStack.getStackSize() >= 10000 )
|
if( activeStack.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( activeStack.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( activeStack.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( activeStack.getStackSize() >= 10000000 )
|
if( activeStack.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.Crafting.getLocal() + ": " + str;
|
str = GuiText.Crafting.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
|
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
|
||||||
|
}
|
||||||
|
|
||||||
downY += 5;
|
downY += 5;
|
||||||
}
|
}
|
||||||
@@ -264,16 +276,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
{
|
{
|
||||||
String str = Long.toString( pendingStack.getStackSize() );
|
String str = Long.toString( pendingStack.getStackSize() );
|
||||||
if( pendingStack.getStackSize() >= 10000 )
|
if( pendingStack.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
if( pendingStack.getStackSize() >= 10000000 )
|
if( pendingStack.getStackSize() >= 10000000 )
|
||||||
|
{
|
||||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||||
|
}
|
||||||
|
|
||||||
str = GuiText.Scheduled.getLocal() + ": " + str;
|
str = GuiText.Scheduled.getLocal() + ": " + str;
|
||||||
int w = 4 + this.fontRendererObj.getStringWidth( 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 );
|
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 )
|
if( this.tooltip == z - viewStart )
|
||||||
|
{
|
||||||
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
@@ -287,7 +305,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
dspToolTip = Platform.getItemDisplayName( is );
|
dspToolTip = Platform.getItemDisplayName( is );
|
||||||
|
|
||||||
if( lineList.size() > 0 )
|
if( lineList.size() > 0 )
|
||||||
|
{
|
||||||
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
||||||
|
}
|
||||||
|
|
||||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||||
toolPosY = y * offY + yo;
|
toolPosY = y * offY + yo;
|
||||||
@@ -326,17 +346,23 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.storage, l );
|
this.handleInput( this.storage, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.active, l );
|
this.handleInput( this.active, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
for( IAEItemStack l : list )
|
for( IAEItemStack l : list )
|
||||||
|
{
|
||||||
this.handleInput( this.pending, l );
|
this.handleInput( this.pending, l );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +371,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
long amt = this.getTotal( l );
|
long amt = this.getTotal( l );
|
||||||
|
|
||||||
if( amt <= 0 )
|
if( amt <= 0 )
|
||||||
|
{
|
||||||
this.deleteVisualStack( l );
|
this.deleteVisualStack( l );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
IAEItemStack is = this.findVisualStack( l );
|
IAEItemStack is = this.findVisualStack( l );
|
||||||
@@ -363,7 +391,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
if( l.getStackSize() <= 0 )
|
if( l.getStackSize() <= 0 )
|
||||||
{
|
{
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
a.reset();
|
a.reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -374,7 +404,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
a.setStackSize( l.getStackSize() );
|
a.setStackSize( l.getStackSize() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,13 +419,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
|||||||
long total = 0;
|
long total = 0;
|
||||||
|
|
||||||
if( a != null )
|
if( a != null )
|
||||||
|
{
|
||||||
total += a.getStackSize();
|
total += a.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
if( b != null )
|
if( b != null )
|
||||||
|
{
|
||||||
total += b.getStackSize();
|
total += b.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
if( c != null )
|
if( c != null )
|
||||||
|
{
|
||||||
total += c.getStackSize();
|
total += c.getStackSize();
|
||||||
|
}
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,11 +166,15 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
|||||||
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
|
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
btnTextText = GuiText.CPUs.getLocal() + ": #" + this.status.selectedCpu;
|
btnTextText = GuiText.CPUs.getLocal() + ": #" + this.status.selectedCpu;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.status.noCPU )
|
if( this.status.noCPU )
|
||||||
|
{
|
||||||
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||||
|
}
|
||||||
|
|
||||||
this.selectCPU.displayString = btnTextText;
|
this.selectCPU.displayString = btnTextText;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
|||||||
for( Object j : c.inventorySlots )
|
for( Object j : c.inventorySlots )
|
||||||
{
|
{
|
||||||
if( j instanceof SlotCraftingMatrix )
|
if( j instanceof SlotCraftingMatrix )
|
||||||
|
{
|
||||||
s = (Slot) j;
|
s = (Slot) j;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( s != null )
|
if( s != null )
|
||||||
|
|||||||
@@ -69,10 +69,14 @@ public class GuiFormationPlane extends GuiUpgradeable
|
|||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
if( this.fuzzyMode != null )
|
if( this.fuzzyMode != null )
|
||||||
|
{
|
||||||
this.fuzzyMode.set( this.cvb.fzMode );
|
this.fuzzyMode.set( this.cvb.fzMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.placeMode != null )
|
if( this.placeMode != null )
|
||||||
|
{
|
||||||
this.placeMode.set( ( (ContainerFormationPlane) this.cvb ).placeMode );
|
this.placeMode.set( ( (ContainerFormationPlane) this.cvb ).placeMode );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -70,13 +70,19 @@ public class GuiIOPort extends GuiUpgradeable
|
|||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
if( this.redstoneMode != null )
|
if( this.redstoneMode != null )
|
||||||
|
{
|
||||||
this.redstoneMode.set( this.cvb.rsMode );
|
this.redstoneMode.set( this.cvb.rsMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.operationMode != null )
|
if( this.operationMode != null )
|
||||||
|
{
|
||||||
this.operationMode.set( ( (ContainerIOPort) this.cvb ).opMode );
|
this.operationMode.set( ( (ContainerIOPort) this.cvb ).opMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.fullMode != null )
|
if( this.fullMode != null )
|
||||||
|
{
|
||||||
this.fullMode.set( ( (ContainerIOPort) this.cvb ).fMode );
|
this.fullMode.set( ( (ContainerIOPort) this.cvb ).fMode );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -111,9 +117,13 @@ public class GuiIOPort extends GuiUpgradeable
|
|||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if( btn == this.fullMode )
|
if( btn == this.fullMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fullMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fullMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( btn == this.operationMode )
|
if( btn == this.operationMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.operationMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.operationMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,9 +77,13 @@ public class GuiInscriber extends AEBaseGui
|
|||||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||||
|
|
||||||
if( this.drawUpgrades() )
|
if( this.drawUpgrades() )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
||||||
|
}
|
||||||
if( this.hasToolbox() )
|
if( this.hasToolbox() )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean drawUpgrades()
|
protected boolean drawUpgrades()
|
||||||
|
|||||||
@@ -68,10 +68,14 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||||
{
|
{
|
||||||
if( this.BlockMode != null )
|
if( this.BlockMode != null )
|
||||||
|
{
|
||||||
this.BlockMode.set( ( (ContainerInterface) this.cvb ).bMode );
|
this.BlockMode.set( ( (ContainerInterface) this.cvb ).bMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.interfaceMode != null )
|
if( this.interfaceMode != null )
|
||||||
|
{
|
||||||
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).iTermMode == YesNo.YES );
|
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).iTermMode == YesNo.YES );
|
||||||
|
}
|
||||||
|
|
||||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
|
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
|
||||||
|
|
||||||
@@ -101,9 +105,13 @@ public class GuiInterface extends GuiUpgradeable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( btn == this.interfaceMode )
|
if( btn == this.interfaceMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( btn == this.BlockMode )
|
if( btn == this.BlockMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
while( o.hasNext() )
|
while( o.hasNext() )
|
||||||
{
|
{
|
||||||
if( o.next() instanceof SlotDisconnected )
|
if( o.next() instanceof SlotDisconnected )
|
||||||
|
{
|
||||||
o.remove();
|
o.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
for( int x = 0; x < LINES_ON_PAGE && ex + x < this.lines.size(); x++ )
|
||||||
@@ -124,10 +126,14 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
String name = (String) lineObj;
|
String name = (String) lineObj;
|
||||||
int rows = this.byName.get( name ).size();
|
int rows = this.byName.get( name ).size();
|
||||||
if( rows > 1 )
|
if( rows > 1 )
|
||||||
|
{
|
||||||
name = name + " (" + rows + ')';
|
name = name + " (" + rows + ')';
|
||||||
|
}
|
||||||
|
|
||||||
while( name.length() > 2 && this.fontRendererObj.getStringWidth( name ) > 155 )
|
while( name.length() > 2 && this.fontRendererObj.getStringWidth( name ) > 155 )
|
||||||
|
{
|
||||||
name = name.substring( 0, name.length() - 1 );
|
name = name.substring( 0, name.length() - 1 );
|
||||||
|
}
|
||||||
|
|
||||||
this.fontRendererObj.drawString( name, 10, 6 + offset, 4210752 );
|
this.fontRendererObj.drawString( name, 10, 6 + offset, 4210752 );
|
||||||
}
|
}
|
||||||
@@ -173,7 +179,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( this.searchField != null )
|
if( this.searchField != null )
|
||||||
|
{
|
||||||
this.searchField.drawTextBox();
|
this.searchField.drawTextBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -182,7 +190,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
if( !this.checkHotbarKeys( key ) )
|
if( !this.checkHotbarKeys( key ) )
|
||||||
{
|
{
|
||||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( this.searchField.textboxKeyTyped( character, key ) )
|
if( this.searchField.textboxKeyTyped( character, key ) )
|
||||||
{
|
{
|
||||||
@@ -218,7 +228,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
|||||||
{
|
{
|
||||||
String which = Integer.toString( x );
|
String which = Integer.toString( x );
|
||||||
if( invData.hasKey( which ) )
|
if( invData.hasKey( which ) )
|
||||||
|
{
|
||||||
current.inv.setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
|
current.inv.setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( NumberFormatException ignored )
|
catch( NumberFormatException ignored )
|
||||||
|
|||||||
@@ -130,10 +130,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||||
|
|
||||||
if( this.craftingMode != null )
|
if( this.craftingMode != null )
|
||||||
|
{
|
||||||
this.craftingMode.set( ( (ContainerLevelEmitter) this.cvb ).cmType );
|
this.craftingMode.set( ( (ContainerLevelEmitter) this.cvb ).cmType );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.levelMode != null )
|
if( this.levelMode != null )
|
||||||
|
{
|
||||||
this.levelMode.set( ( (ContainerLevelEmitter) this.cvb ).lvType );
|
this.levelMode.set( ( (ContainerLevelEmitter) this.cvb ).lvType );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -170,16 +174,22 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if( btn == this.craftingMode )
|
if( btn == this.craftingMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftingMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftingMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( btn == this.levelMode )
|
if( btn == this.levelMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.levelMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.levelMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
boolean isPlus = btn == this.plus1 || btn == this.plus10 || btn == this.plus100 || btn == this.plus1000;
|
||||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||||
|
|
||||||
if( isPlus || isMinus )
|
if( isPlus || isMinus )
|
||||||
|
{
|
||||||
this.addQty( this.getQty( btn ) );
|
this.addQty( this.getQty( btn ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addQty( long i )
|
private void addQty( long i )
|
||||||
@@ -196,15 +206,21 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( Fixed )
|
if( Fixed )
|
||||||
|
{
|
||||||
this.level.setText( Out );
|
this.level.setText( Out );
|
||||||
|
}
|
||||||
|
|
||||||
if( Out.length() == 0 )
|
if( Out.length() == 0 )
|
||||||
|
{
|
||||||
Out = "0";
|
Out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
long result = Long.parseLong( Out );
|
long result = Long.parseLong( Out );
|
||||||
result += i;
|
result += i;
|
||||||
if( result < 0 )
|
if( result < 0 )
|
||||||
|
{
|
||||||
result = 0;
|
result = 0;
|
||||||
|
}
|
||||||
|
|
||||||
this.level.setText( Out = Long.toString( result ) );
|
this.level.setText( Out = Long.toString( result ) );
|
||||||
|
|
||||||
@@ -240,10 +256,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( Fixed )
|
if( Fixed )
|
||||||
|
{
|
||||||
this.level.setText( Out );
|
this.level.setText( Out );
|
||||||
|
}
|
||||||
|
|
||||||
if( Out.length() == 0 )
|
if( Out.length() == 0 )
|
||||||
|
{
|
||||||
Out = "0";
|
Out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
this.ySize = 204;
|
this.ySize = 204;
|
||||||
|
|
||||||
if( te instanceof IViewCellStorage )
|
if( te instanceof IViewCellStorage )
|
||||||
|
{
|
||||||
this.xSize += 33;
|
this.xSize += 33;
|
||||||
|
}
|
||||||
|
|
||||||
this.standardSize = this.xSize;
|
this.standardSize = this.xSize;
|
||||||
|
|
||||||
@@ -121,21 +123,33 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
this.viewCell = te instanceof IViewCellStorage;
|
this.viewCell = te instanceof IViewCellStorage;
|
||||||
|
|
||||||
if( te instanceof TileSecurity )
|
if( te instanceof TileSecurity )
|
||||||
|
{
|
||||||
this.myName = GuiText.Security;
|
this.myName = GuiText.Security;
|
||||||
|
}
|
||||||
else if( te instanceof WirelessTerminalGuiObject )
|
else if( te instanceof WirelessTerminalGuiObject )
|
||||||
|
{
|
||||||
this.myName = GuiText.WirelessTerminal;
|
this.myName = GuiText.WirelessTerminal;
|
||||||
|
}
|
||||||
else if( te instanceof IPortableCell )
|
else if( te instanceof IPortableCell )
|
||||||
|
{
|
||||||
this.myName = GuiText.PortableCell;
|
this.myName = GuiText.PortableCell;
|
||||||
|
}
|
||||||
else if( te instanceof IMEChest )
|
else if( te instanceof IMEChest )
|
||||||
|
{
|
||||||
this.myName = GuiText.Chest;
|
this.myName = GuiText.Chest;
|
||||||
|
}
|
||||||
else if( te instanceof PartTerminal )
|
else if( te instanceof PartTerminal )
|
||||||
|
{
|
||||||
this.myName = GuiText.Terminal;
|
this.myName = GuiText.Terminal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postUpdate( List<IAEItemStack> list )
|
public void postUpdate( List<IAEItemStack> list )
|
||||||
{
|
{
|
||||||
for( IAEItemStack is : list )
|
for( IAEItemStack is : list )
|
||||||
|
{
|
||||||
this.repo.postUpdate( is );
|
this.repo.postUpdate( is );
|
||||||
|
}
|
||||||
|
|
||||||
this.repo.updateView();
|
this.repo.updateView();
|
||||||
this.setScrollBar();
|
this.setScrollBar();
|
||||||
@@ -166,9 +180,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
||||||
|
|
||||||
if( btn == this.terminalStyleBox )
|
if( btn == this.terminalStyleBox )
|
||||||
|
{
|
||||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||||
|
}
|
||||||
else if( btn == this.searchBoxSettings )
|
else if( btn == this.searchBoxSettings )
|
||||||
|
{
|
||||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -184,7 +202,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
iBtn.set( next );
|
iBtn.set( next );
|
||||||
|
|
||||||
if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class )
|
if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class )
|
||||||
|
{
|
||||||
this.re_init();
|
this.re_init();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -217,10 +237,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( hasNEI )
|
if( hasNEI )
|
||||||
|
{
|
||||||
this.rows--;
|
this.rows--;
|
||||||
|
}
|
||||||
|
|
||||||
if( this.rows < 3 )
|
if( this.rows < 3 )
|
||||||
|
{
|
||||||
this.rows = 3;
|
this.rows = 3;
|
||||||
|
}
|
||||||
|
|
||||||
this.meSlots.clear();
|
this.meSlots.clear();
|
||||||
for( int y = 0; y < this.rows; y++ )
|
for( int y = 0; y < this.rows; y++ )
|
||||||
@@ -232,9 +256,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL )
|
if( AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL )
|
||||||
|
{
|
||||||
this.xSize = this.standardSize + ( ( this.perRow - 9 ) * 18 );
|
this.xSize = this.standardSize + ( ( this.perRow - 9 ) * 18 );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.xSize = this.standardSize;
|
this.xSize = this.standardSize;
|
||||||
|
}
|
||||||
|
|
||||||
super.initGui();
|
super.initGui();
|
||||||
// full size : 204
|
// full size : 204
|
||||||
@@ -303,7 +331,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
if( s instanceof AppEngSlot )
|
if( s instanceof AppEngSlot )
|
||||||
{
|
{
|
||||||
if( ( (AppEngSlot) s ).xDisplayPosition < 197 )
|
if( ( (AppEngSlot) s ).xDisplayPosition < 197 )
|
||||||
|
{
|
||||||
this.repositionSlot( (AppEngSlot) s );
|
this.repositionSlot( (AppEngSlot) s );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
||||||
@@ -365,10 +395,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
|
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
|
||||||
|
|
||||||
if( this.viewCell || ( this instanceof GuiSecurity ) )
|
if( this.viewCell || ( this instanceof GuiSecurity ) )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
|
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
|
||||||
|
}
|
||||||
|
|
||||||
for( int x = 0; x < this.rows; x++ )
|
for( int x = 0; x < this.rows; x++ )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
|
this.drawTexturedModalRect( offsetX, offsetY + 18 + x * 18, 0, 18, x_width, 18 );
|
||||||
|
}
|
||||||
|
|
||||||
this.drawTexturedModalRect( offsetX, offsetY + 16 + this.rows * 18 + this.lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + this.reservedSpace - this.lowerTextureOffset );
|
this.drawTexturedModalRect( offsetX, offsetY + 16 + this.rows * 18 + this.lowerTextureOffset, 0, 106 - 18 - 18, x_width, 99 + this.reservedSpace - this.lowerTextureOffset );
|
||||||
|
|
||||||
@@ -386,11 +420,15 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( update )
|
if( update )
|
||||||
|
{
|
||||||
this.repo.setViewCell( this.myCurrentViewCells );
|
this.repo.setViewCell( this.myCurrentViewCells );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( this.searchField != null )
|
if( this.searchField != null )
|
||||||
|
{
|
||||||
this.searchField.drawTextBox();
|
this.searchField.drawTextBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
@@ -420,7 +458,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
if( !this.checkHotbarKeys( key ) )
|
if( !this.checkHotbarKeys( key ) )
|
||||||
{
|
{
|
||||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( this.searchField.textboxKeyTyped( character, key ) )
|
if( this.searchField.textboxKeyTyped( character, key ) )
|
||||||
{
|
{
|
||||||
@@ -464,13 +504,19 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
|||||||
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
||||||
{
|
{
|
||||||
if( this.SortByBox != null )
|
if( this.SortByBox != null )
|
||||||
|
{
|
||||||
this.SortByBox.set( this.configSrc.getSetting( Settings.SORT_BY ) );
|
this.SortByBox.set( this.configSrc.getSetting( Settings.SORT_BY ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.SortDirBox != null )
|
if( this.SortDirBox != null )
|
||||||
|
{
|
||||||
this.SortDirBox.set( this.configSrc.getSetting( Settings.SORT_DIRECTION ) );
|
this.SortDirBox.set( this.configSrc.getSetting( Settings.SORT_DIRECTION ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.ViewBox != null )
|
if( this.ViewBox != null )
|
||||||
|
{
|
||||||
this.ViewBox.set( this.configSrc.getSetting( Settings.VIEW_MODE ) );
|
this.ViewBox.set( this.configSrc.getSetting( Settings.VIEW_MODE ) );
|
||||||
|
}
|
||||||
|
|
||||||
this.repo.updateView();
|
this.repo.updateView();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class GuiMEPortableCell extends GuiMEMonitorable
|
|||||||
|
|
||||||
public GuiMEPortableCell( InventoryPlayer inventoryPlayer, IPortableCell te )
|
public GuiMEPortableCell( InventoryPlayer inventoryPlayer, IPortableCell te )
|
||||||
{
|
{
|
||||||
super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, null ) );
|
super( inventoryPlayer, te, new ContainerMEPortableCell( inventoryPlayer, te ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
int defaultGetMaxRows()
|
int defaultGetMaxRows()
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
|
|
||||||
String str = Long.toString( refStack.getStackSize() );
|
String str = Long.toString( refStack.getStackSize() );
|
||||||
if( refStack.getStackSize() >= 10000 )
|
if( refStack.getStackSize() >= 10000 )
|
||||||
|
{
|
||||||
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
|
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
|
||||||
|
}
|
||||||
|
|
||||||
int w = this.fontRendererObj.getStringWidth( str );
|
int w = this.fontRendererObj.getStringWidth( str );
|
||||||
this.fontRendererObj.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2, 4210752 );
|
this.fontRendererObj.drawString( str, (int) ( ( x * sectionLength + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * 18 + yo + 6 ) * 2, 4210752 );
|
||||||
@@ -176,7 +178,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
|
|
||||||
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
|
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
|
||||||
if( refStack.getCountRequestable() > 0 )
|
if( refStack.getCountRequestable() > 0 )
|
||||||
|
{
|
||||||
toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
|
toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
|
||||||
|
}
|
||||||
|
|
||||||
toolPosX = x * sectionLength + xo + sectionLength - 8;
|
toolPosX = x * sectionLength + xo + sectionLength - 8;
|
||||||
toolPosY = y * 18 + yo;
|
toolPosY = y * 18 + yo;
|
||||||
@@ -214,7 +218,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
this.repo.clear();
|
this.repo.clear();
|
||||||
|
|
||||||
for( IAEItemStack is : list )
|
for( IAEItemStack is : list )
|
||||||
|
{
|
||||||
this.repo.postUpdate( is );
|
this.repo.postUpdate( is );
|
||||||
|
}
|
||||||
|
|
||||||
this.repo.updateView();
|
this.repo.updateView();
|
||||||
this.setScrollBar();
|
this.setScrollBar();
|
||||||
@@ -249,7 +255,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
if( myStack != null )
|
if( myStack != null )
|
||||||
{
|
{
|
||||||
while( currentToolTip.size() > 1 )
|
while( currentToolTip.size() > 1 )
|
||||||
|
{
|
||||||
currentToolTip.remove( 1 );
|
currentToolTip.remove( 1 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -278,7 +286,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
|||||||
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
List currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||||
|
|
||||||
while( currentToolTip.size() > 1 )
|
while( currentToolTip.size() > 1 )
|
||||||
|
{
|
||||||
currentToolTip.remove( 1 );
|
currentToolTip.remove( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
currentToolTip.add( GuiText.Installed.getLocal() + ": " + ( myStack.getStackSize() ) );
|
currentToolTip.add( GuiText.Installed.getLocal() + ": " + ( myStack.getStackSize() ) );
|
||||||
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||||
|
|||||||
@@ -53,7 +53,9 @@ public class GuiNetworkTool extends AEBaseGui
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( btn == this.tFacades )
|
if( btn == this.tFacades )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "NetworkTool", "Toggle" ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "NetworkTool", "Toggle" ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( IOException e )
|
catch( IOException e )
|
||||||
{
|
{
|
||||||
@@ -75,7 +77,9 @@ public class GuiNetworkTool extends AEBaseGui
|
|||||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||||
{
|
{
|
||||||
if( this.tFacades != null )
|
if( this.tFacades != null )
|
||||||
|
{
|
||||||
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).facadeMode );
|
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).facadeMode );
|
||||||
|
}
|
||||||
|
|
||||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
|
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 4210752 );
|
||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
{
|
{
|
||||||
if( this.container.craftingMode )
|
if( this.container.craftingMode )
|
||||||
|
{
|
||||||
return "guis/pattern.png";
|
return "guis/pattern.png";
|
||||||
|
}
|
||||||
return "guis/pattern2.png";
|
return "guis/pattern2.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,8 +140,12 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
|||||||
protected void repositionSlot( AppEngSlot s )
|
protected void repositionSlot( AppEngSlot s )
|
||||||
{
|
{
|
||||||
if( s.isPlayerSide() )
|
if( s.isPlayerSide() )
|
||||||
|
{
|
||||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 3;
|
s.yDisplayPosition = s.defY + this.ySize - 78 - 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,7 +156,9 @@ public class GuiPriority extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( this.OriginalGui != null && myIcon != null )
|
if( this.OriginalGui != null && myIcon != null )
|
||||||
|
{
|
||||||
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
this.buttonList.add( this.originalGuiBtn = new GuiTabButton( this.guiLeft + 154, this.guiTop, myIcon, myIcon.getDisplayName(), itemRender ) );
|
||||||
|
}
|
||||||
|
|
||||||
this.priority = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Long.class );
|
this.priority = new GuiNumberBox( this.fontRendererObj, this.guiLeft + 62, this.guiTop + 57, 59, this.fontRendererObj.FONT_HEIGHT, Long.class );
|
||||||
this.priority.setEnableBackgroundDrawing( false );
|
this.priority.setEnableBackgroundDrawing( false );
|
||||||
@@ -196,7 +198,9 @@ public class GuiPriority extends AEBaseGui
|
|||||||
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
boolean isMinus = btn == this.minus1 || btn == this.minus10 || btn == this.minus100 || btn == this.minus1000;
|
||||||
|
|
||||||
if( isPlus || isMinus )
|
if( isPlus || isMinus )
|
||||||
|
{
|
||||||
this.addQty( this.getQty( btn ) );
|
this.addQty( this.getQty( btn ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addQty( int i )
|
private void addQty( int i )
|
||||||
@@ -213,10 +217,14 @@ public class GuiPriority extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( fixed )
|
if( fixed )
|
||||||
|
{
|
||||||
this.priority.setText( out );
|
this.priority.setText( out );
|
||||||
|
}
|
||||||
|
|
||||||
if( out.length() == 0 )
|
if( out.length() == 0 )
|
||||||
|
{
|
||||||
out = "0";
|
out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
long result = Long.parseLong( out );
|
long result = Long.parseLong( out );
|
||||||
result += i;
|
result += i;
|
||||||
@@ -255,10 +263,14 @@ public class GuiPriority extends AEBaseGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( fixed )
|
if( fixed )
|
||||||
|
{
|
||||||
this.priority.setText( out );
|
this.priority.setText( out );
|
||||||
|
}
|
||||||
|
|
||||||
if( out.length() == 0 )
|
if( out.length() == 0 )
|
||||||
|
{
|
||||||
out = "0";
|
out = "0";
|
||||||
|
}
|
||||||
|
|
||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", out ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", out ) );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,15 +62,25 @@ public class GuiSecurity extends GuiMEMonitorable
|
|||||||
SecurityPermissions toggleSetting = null;
|
SecurityPermissions toggleSetting = null;
|
||||||
|
|
||||||
if( btn == this.inject )
|
if( btn == this.inject )
|
||||||
|
{
|
||||||
toggleSetting = SecurityPermissions.INJECT;
|
toggleSetting = SecurityPermissions.INJECT;
|
||||||
|
}
|
||||||
if( btn == this.extract )
|
if( btn == this.extract )
|
||||||
|
{
|
||||||
toggleSetting = SecurityPermissions.EXTRACT;
|
toggleSetting = SecurityPermissions.EXTRACT;
|
||||||
|
}
|
||||||
if( btn == this.craft )
|
if( btn == this.craft )
|
||||||
|
{
|
||||||
toggleSetting = SecurityPermissions.CRAFT;
|
toggleSetting = SecurityPermissions.CRAFT;
|
||||||
|
}
|
||||||
if( btn == this.build )
|
if( btn == this.build )
|
||||||
|
{
|
||||||
toggleSetting = SecurityPermissions.BUILD;
|
toggleSetting = SecurityPermissions.BUILD;
|
||||||
|
}
|
||||||
if( btn == this.security )
|
if( btn == this.security )
|
||||||
|
{
|
||||||
toggleSetting = SecurityPermissions.SECURITY;
|
toggleSetting = SecurityPermissions.SECURITY;
|
||||||
|
}
|
||||||
|
|
||||||
if( toggleSetting != null )
|
if( toggleSetting != null )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -84,13 +84,19 @@ public class GuiStorageBus extends GuiUpgradeable
|
|||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
if( this.fuzzyMode != null )
|
if( this.fuzzyMode != null )
|
||||||
|
{
|
||||||
this.fuzzyMode.set( this.cvb.fzMode );
|
this.fuzzyMode.set( this.cvb.fzMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.storageFilter != null )
|
if( this.storageFilter != null )
|
||||||
|
{
|
||||||
this.storageFilter.set( ( (ContainerStorageBus) this.cvb ).storageFilter );
|
this.storageFilter.set( ( (ContainerStorageBus) this.cvb ).storageFilter );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.rwMode != null )
|
if( this.rwMode != null )
|
||||||
|
{
|
||||||
this.rwMode.set( ( (ContainerStorageBus) this.cvb ).rwMode );
|
this.rwMode.set( ( (ContainerStorageBus) this.cvb ).rwMode );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -109,19 +115,25 @@ public class GuiStorageBus extends GuiUpgradeable
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( btn == this.partition )
|
if( btn == this.partition )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Partition" ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Partition" ) );
|
||||||
|
}
|
||||||
else if( btn == this.clear )
|
else if( btn == this.clear )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Clear" ) );
|
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Clear" ) );
|
||||||
|
}
|
||||||
else if( btn == this.priority )
|
else if( btn == this.priority )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||||
|
}
|
||||||
else if( btn == this.rwMode )
|
else if( btn == this.rwMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.rwMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.rwMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
else if( btn == this.storageFilter )
|
else if( btn == this.storageFilter )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.storageFilter.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.storageFilter.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( IOException e )
|
catch( IOException e )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -94,13 +94,19 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||||
|
|
||||||
if( this.redstoneMode != null )
|
if( this.redstoneMode != null )
|
||||||
|
{
|
||||||
this.redstoneMode.set( this.cvb.rsMode );
|
this.redstoneMode.set( this.cvb.rsMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.fuzzyMode != null )
|
if( this.fuzzyMode != null )
|
||||||
|
{
|
||||||
this.fuzzyMode.set( this.cvb.fzMode );
|
this.fuzzyMode.set( this.cvb.fzMode );
|
||||||
|
}
|
||||||
|
|
||||||
if( this.craftMode != null )
|
if( this.craftMode != null )
|
||||||
|
{
|
||||||
this.craftMode.set( this.cvb.cMode );
|
this.craftMode.set( this.cvb.cMode );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -111,19 +117,29 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
this.bindTexture( this.getBackground() );
|
this.bindTexture( this.getBackground() );
|
||||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||||
if( this.drawUpgrades() )
|
if( this.drawUpgrades() )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvb.availableUpgrades() * 18 );
|
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvb.availableUpgrades() * 18 );
|
||||||
|
}
|
||||||
if( this.hasToolbox() )
|
if( this.hasToolbox() )
|
||||||
|
{
|
||||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void handleButtonVisibility()
|
protected void handleButtonVisibility()
|
||||||
{
|
{
|
||||||
if( this.redstoneMode != null )
|
if( this.redstoneMode != null )
|
||||||
|
{
|
||||||
this.redstoneMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );
|
this.redstoneMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );
|
||||||
|
}
|
||||||
if( this.fuzzyMode != null )
|
if( this.fuzzyMode != null )
|
||||||
|
{
|
||||||
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||||
|
}
|
||||||
if( this.craftMode != null )
|
if( this.craftMode != null )
|
||||||
|
{
|
||||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getBackground()
|
protected String getBackground()
|
||||||
@@ -149,12 +165,18 @@ public class GuiUpgradeable extends AEBaseGui
|
|||||||
boolean backwards = Mouse.isButtonDown( 1 );
|
boolean backwards = Mouse.isButtonDown( 1 );
|
||||||
|
|
||||||
if( btn == this.redstoneMode )
|
if( btn == this.redstoneMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.redstoneMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.redstoneMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( btn == this.craftMode )
|
if( btn == this.craftMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
|
|
||||||
if( btn == this.fuzzyMode )
|
if( btn == this.fuzzyMode )
|
||||||
|
{
|
||||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class GuiVibrationChamber extends AEBaseGui
|
|||||||
int k = 25;
|
int k = 25;
|
||||||
int l = -15;
|
int l = -15;
|
||||||
|
|
||||||
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " ae/t" );
|
this.pb.setFullMsg( this.cvc.aePerTick * this.cvc.getCurrentProgress() / 100 + " AE/t" );
|
||||||
|
|
||||||
if( this.cvc.getCurrentProgress() > 0 )
|
if( this.cvc.getCurrentProgress() > 0 )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,9 +193,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||||
|
|
||||||
if( this.enabled )
|
if( this.enabled )
|
||||||
|
{
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||||
|
}
|
||||||
|
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||||
@@ -212,9 +216,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( this.enabled )
|
if( this.enabled )
|
||||||
|
{
|
||||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||||
|
}
|
||||||
|
|
||||||
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
|
||||||
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
|
||||||
@@ -236,7 +244,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
{
|
{
|
||||||
ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||||
if( app == null )
|
if( app == null )
|
||||||
|
{
|
||||||
return 256 - 1;
|
return 256 - 1;
|
||||||
|
}
|
||||||
return app.index;
|
return app.index;
|
||||||
}
|
}
|
||||||
return 256 - 1;
|
return 256 - 1;
|
||||||
@@ -262,7 +272,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
{
|
{
|
||||||
ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||||
if( buttonAppearance == null )
|
if( buttonAppearance == null )
|
||||||
|
{
|
||||||
return "No Such Message";
|
return "No Such Message";
|
||||||
|
}
|
||||||
|
|
||||||
displayName = buttonAppearance.displayName;
|
displayName = buttonAppearance.displayName;
|
||||||
displayValue = buttonAppearance.displayValue;
|
displayValue = buttonAppearance.displayValue;
|
||||||
@@ -274,19 +286,27 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
String value = StatCollector.translateToLocal( displayValue );
|
String value = StatCollector.translateToLocal( displayValue );
|
||||||
|
|
||||||
if( name == null || name.isEmpty() )
|
if( name == null || name.isEmpty() )
|
||||||
|
{
|
||||||
name = displayName;
|
name = displayName;
|
||||||
|
}
|
||||||
if( value == null || value.isEmpty() )
|
if( value == null || value.isEmpty() )
|
||||||
|
{
|
||||||
value = displayValue;
|
value = displayValue;
|
||||||
|
}
|
||||||
|
|
||||||
if( this.fillVar != null )
|
if( this.fillVar != null )
|
||||||
|
{
|
||||||
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
|
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
|
||||||
|
}
|
||||||
|
|
||||||
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||||
StringBuilder sb = new StringBuilder( value );
|
StringBuilder sb = new StringBuilder( value );
|
||||||
|
|
||||||
int i = sb.lastIndexOf( "\n" );
|
int i = sb.lastIndexOf( "\n" );
|
||||||
if( i <= 0 )
|
if( i <= 0 )
|
||||||
|
{
|
||||||
i = 0;
|
i = 0;
|
||||||
|
}
|
||||||
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
|
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
|
||||||
{
|
{
|
||||||
sb.replace( i, i + 1, "\n" );
|
sb.replace( i, i + 1, "\n" );
|
||||||
@@ -357,9 +377,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
public boolean equals( Object obj )
|
public boolean equals( Object obj )
|
||||||
{
|
{
|
||||||
if( obj == null )
|
if( obj == null )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
if( this.getClass() != obj.getClass() )
|
if( this.getClass() != obj.getClass() )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
EnumPair other = (EnumPair) obj;
|
EnumPair other = (EnumPair) obj;
|
||||||
return other.setting == this.setting && other.value == this.value;
|
return other.setting == this.setting && other.value == this.value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,11 +43,17 @@ public class GuiNumberBox extends GuiTextField
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if( this.type == int.class || this.type == Integer.class )
|
if( this.type == int.class || this.type == Integer.class )
|
||||||
|
{
|
||||||
Integer.parseInt( this.getText() );
|
Integer.parseInt( this.getText() );
|
||||||
|
}
|
||||||
else if( this.type == long.class || this.type == Long.class )
|
else if( this.type == long.class || this.type == Long.class )
|
||||||
|
{
|
||||||
Long.parseLong( this.getText() );
|
Long.parseLong( this.getText() );
|
||||||
|
}
|
||||||
else if( this.type == double.class || this.type == Double.class )
|
else if( this.type == double.class || this.type == Double.class )
|
||||||
|
{
|
||||||
Double.parseDouble( this.getText() );
|
Double.parseDouble( this.getText() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch( NumberFormatException e )
|
catch( NumberFormatException e )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -91,7 +91,9 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
|||||||
public String getMessage()
|
public String getMessage()
|
||||||
{
|
{
|
||||||
if( this.fullMsg != null )
|
if( this.fullMsg != null )
|
||||||
|
{
|
||||||
return this.fullMsg;
|
return this.fullMsg;
|
||||||
|
}
|
||||||
|
|
||||||
return ( this.titleName != null ? this.titleName : "" ) + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
|
return ( this.titleName != null ? this.titleName : "" ) + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ public class GuiScrollbar implements IScrollSource
|
|||||||
this.pageSize = pageSize;
|
this.pageSize = pageSize;
|
||||||
|
|
||||||
if( this.minScroll > this.maxScroll )
|
if( this.minScroll > this.maxScroll )
|
||||||
|
{
|
||||||
this.maxScroll = this.minScroll;
|
this.maxScroll = this.minScroll;
|
||||||
|
}
|
||||||
|
|
||||||
this.applyRange();
|
this.applyRange();
|
||||||
}
|
}
|
||||||
@@ -128,7 +130,9 @@ public class GuiScrollbar implements IScrollSource
|
|||||||
public void click( AEBaseGui aeBaseGui, int x, int y )
|
public void click( AEBaseGui aeBaseGui, int x, int y )
|
||||||
{
|
{
|
||||||
if( this.getRange() == 0 )
|
if( this.getRange() == 0 )
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( x > this.displayX && x <= this.displayX + this.width )
|
if( x > this.displayX && x <= this.displayX + this.width )
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user