Compare commits
55 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 643f559186 | |||
| 09ed06e47f | |||
| c1c3655db6 | |||
| b05796e62b | |||
| 200e56a509 | |||
| 9540bbce49 | |||
| c6d932da04 | |||
| 6e7100361c | |||
| ca50ee0762 | |||
| f00d5c297f | |||
| b13f5ced01 | |||
| 1c0f1ea243 | |||
| b612ff47a3 | |||
| e8a68cc531 | |||
| 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 |
+1
-1
@@ -7,7 +7,7 @@
|
||||
!gradlew
|
||||
!gradlew.bat
|
||||
!build.gradle
|
||||
!build.properties
|
||||
!gradle.properties
|
||||
|
||||
# include markdowns
|
||||
!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
|
||||
|
||||
## Table of Contents
|
||||
@@ -26,12 +29,17 @@ A Mod about Matter, Energy and using them to conquer the world..
|
||||
|
||||
## License
|
||||
|
||||
Applied Energistics 2 API is (c) 2013 - 2014 AlgorithmX2 and licensed under MIT.
|
||||
|
||||
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.
|
||||
|
||||
Textures and Models are licensed under [Creative Commons, Attribution-NonCommercial-ShareAlike 3.0]( https://creativecommons.org/licenses/by-nc-sa/3.0/).
|
||||
* Applied Energistics 2 API
|
||||
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||
- 
|
||||
* Applied Energistics 2
|
||||
- (c) 2013 - 2015 AlgorithmX2 et al
|
||||
- [](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
|
||||
|
||||
@@ -103,7 +111,7 @@ Getting Started
|
||||
6. Push to your fork `git push`
|
||||
7. Create a Pull-Request on GitHub
|
||||
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.
|
||||
|
||||
@@ -137,10 +145,6 @@ An example string would be `appeng:appliedenergistics2:rv2-alpha-30:dev`
|
||||
|
||||
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
|
||||
|
||||
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).
|
||||
|
||||
+8
-7
@@ -18,14 +18,15 @@
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
apply from: 'gradle/scripts/propertyloader.gradle'
|
||||
apply from: 'gradle/scripts/dependencies.gradle'
|
||||
apply from: 'gradle/scripts/artifacts.gradle'
|
||||
apply from: 'gradle/scripts/autoinstallruntime.gradle'
|
||||
apply from: 'gradle/scripts/integration.gradle'
|
||||
apply from: 'gradle/scripts/optional.gradle'
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
@@ -51,9 +52,9 @@ configurations.all {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_6
|
||||
targetCompatibility = JavaVersion.VERSION_1_6
|
||||
|
||||
version = config.version + "-" + config.aechannel + "-" + config.build
|
||||
group = config.group
|
||||
archivesBaseName = config.archivesBaseName
|
||||
version = aeversion + "-" + aechannel + "-" + aebuild
|
||||
group = aegroup
|
||||
archivesBaseName = aebasename
|
||||
|
||||
// If TeamCity is running this build, lets set the version info
|
||||
if (hasProperty("teamcity")) {
|
||||
@@ -78,11 +79,11 @@ jar {
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version
|
||||
version = minecraft_version + "-" + forge_version
|
||||
|
||||
replaceIn "AEConfig.java"
|
||||
replace "@version@", project.version
|
||||
replace "@aechannel@", config.aechannel
|
||||
replace "@aechannel@", aechannel
|
||||
|
||||
// used when launching minecraft in dev env
|
||||
runDir = "run"
|
||||
@@ -111,7 +112,7 @@ processResources {
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
expand 'version': project.version, 'mcversion': config.minecraft_version
|
||||
expand 'version': project.version, 'mcversion': minecraft_version
|
||||
include 'pack.mcmeta'
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
version=rv2
|
||||
aechannel=beta
|
||||
build=0
|
||||
group=appeng
|
||||
archivesBaseName=appliedenergistics2
|
||||
|
||||
#########################################################
|
||||
# Versions #
|
||||
#########################################################
|
||||
minecraft_version=1.7.10
|
||||
forge_version=10.13.2.1291
|
||||
|
||||
#########################################################
|
||||
# APIs used for development #
|
||||
#########################################################
|
||||
cb_minecraft_version=1.7.10
|
||||
fmp_version=1.1.1.324
|
||||
code_chicken_lib_version=1.1.3.127
|
||||
code_chicken_core_version=1.0.4.35
|
||||
nei_version=1.0.4.90
|
||||
bc_version=6.4.6
|
||||
|
||||
#########################################################
|
||||
# API Stubs #
|
||||
# Note: Do not edit these version numbers as they are #
|
||||
# not the version of the mod, but stub code for AE2 to #
|
||||
# compile #
|
||||
#########################################################
|
||||
api_betterstorage_version=1
|
||||
api_coloredlightscore_version=1
|
||||
api_craftguide_version=1
|
||||
api_ic2_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_railcraft_version=1
|
||||
api_rblocks_version=1
|
||||
api_rf_version=2
|
||||
api_rotarycraft_version=V5c
|
||||
api_waila_version=1.5.10_1.7.10
|
||||
@@ -0,0 +1,57 @@
|
||||
aeversion=rv2
|
||||
aechannel=stable
|
||||
aebuild=0
|
||||
aegroup=appeng
|
||||
aebasename=appliedenergistics2
|
||||
|
||||
#########################################################
|
||||
# Versions #
|
||||
#########################################################
|
||||
minecraft_version=1.7.10
|
||||
forge_version=10.13.2.1291
|
||||
|
||||
#########################################################
|
||||
# Installable #
|
||||
#########################################################
|
||||
waila_version=1.5.10
|
||||
jabba_version=1.2.1a
|
||||
enderstorage_version=1.4.7.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 #
|
||||
#########################################################
|
||||
fmp_version=1.1.1.324
|
||||
code_chicken_lib_version=1.1.3.127
|
||||
code_chicken_core_version=1.0.4.35
|
||||
nei_version=1.0.4.90
|
||||
bc_version=6.4.6
|
||||
|
||||
#########################################################
|
||||
# Self Compiled APIs #
|
||||
#########################################################
|
||||
mekansim_version=8.0.1.198
|
||||
rotarycraft_version=V6e
|
||||
|
||||
|
||||
#########################################################
|
||||
# Self Compiled API Stubs #
|
||||
# Note: Do not edit these version numbers as they are #
|
||||
# not the version of the mod, but stub code for AE2 to #
|
||||
# compile #
|
||||
#########################################################
|
||||
api_coloredlightscore_version=1
|
||||
api_craftguide_version=1
|
||||
api_immibis_version=1
|
||||
api_mfr_version=1
|
||||
api_railcraft_version=1
|
||||
api_rblocks_version=1
|
||||
api_rf_version=2
|
||||
@@ -19,14 +19,14 @@
|
||||
|
||||
|
||||
repositories {
|
||||
|
||||
mavenLocal()
|
||||
maven {
|
||||
name 'CB Maven FS'
|
||||
name "ChickenBones"
|
||||
url "http://chickenbones.net/maven/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name "Waila Mobius Repo"
|
||||
name "Mobius"
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
}
|
||||
|
||||
@@ -34,31 +34,86 @@ repositories {
|
||||
name "FireBall API Depot"
|
||||
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 {
|
||||
// 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:CodeChickenLib:${config.cb_minecraft_version}-${config.code_chicken_lib_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${config.cb_minecraft_version}-${config.code_chicken_core_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${config.cb_minecraft_version}-${config.nei_version}:dev"
|
||||
compile "codechicken:ForgeMultipart:${minecraft_version}-${fmp_version}:dev"
|
||||
compile "codechicken:CodeChickenLib:${minecraft_version}-${code_chicken_lib_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
||||
|
||||
compile "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
|
||||
compile(group: 'api', name: 'betterstorage', version: "${config.api_betterstorage_version}")
|
||||
compile(group: 'api', name: 'coloredlightscore', version: "${config.api_coloredlightscore_version}")
|
||||
compile(group: 'api', name: 'craftguide', version: "${config.api_craftguide_version}")
|
||||
compile(group: 'api', name: 'ic2', version: "${config.api_ic2_version}")
|
||||
compile(group: 'api', name: 'immibis', version: "${config.api_immibis_version}")
|
||||
compile(group: 'api', name: 'invtweaks', version: "${config.api_invtweaks_version}")
|
||||
compile(group: 'api', name: 'mfr', version: "${config.api_mfr_version}")
|
||||
compile(group: 'api', name: 'railcraft', version: "${config.api_railcraft_version}")
|
||||
compile(group: 'api', name: 'rblocks', version: "${config.api_rblocks_version}")
|
||||
compile(group: 'api', name: 'rf', version: "${config.api_rf_version}")
|
||||
compile "appeng:Waila:${config.api_waila_version}:api"
|
||||
compile "appeng:RotaryCraft:${config.api_rotarycraft_version}:api"
|
||||
compile "appeng:mekanism:${config.api_mekansim_version}:api"
|
||||
compile "appeng:Waila:${waila_version}_${minecraft_version}:api"
|
||||
compile "appeng:RotaryCraft:${rotarycraft_version}:api"
|
||||
compile "appeng:mekanism:${minecraft_version}-${mekansim_version}:api"
|
||||
compile "appeng:InventoryTweaks:${invtweaks_version}:api"
|
||||
|
||||
// self compiled stubs
|
||||
compile(group: 'api', name: 'coloredlightscore', version: "${api_coloredlightscore_version}")
|
||||
compile(group: 'api', name: 'craftguide', version: "${api_craftguide_version}")
|
||||
compile(group: 'api', name: 'immibis', version: "${api_immibis_version}")
|
||||
compile(group: 'api', name: 'mfr', version: "${api_mfr_version}")
|
||||
compile(group: 'api', name: 'railcraft', version: "${api_railcraft_version}")
|
||||
compile(group: 'api', name: 'rblocks', version: "${api_rblocks_version}")
|
||||
compile(group: 'api', name: 'rf', version: "${api_rf_version}")
|
||||
|
||||
testCompile "junit:junit:4.11"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
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
|
||||
|
||||
@@ -3,6 +3,7 @@ package appeng.api.definitions;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
@@ -18,4 +19,16 @@ public interface IBlockDefinition extends IItemDefinition
|
||||
* @return the {@link ItemBlock} implementation if applicable
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv2
|
||||
* @since rv2
|
||||
*/
|
||||
public interface IComparableDefinition
|
||||
{
|
||||
@@ -28,6 +32,9 @@ public interface IComparableDefinition
|
||||
* @param z z pos of block
|
||||
*
|
||||
* @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 );
|
||||
}
|
||||
|
||||
@@ -80,7 +80,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
public StackType injectItems( StackType input, Actionable mode, BaseActionSource src )
|
||||
{
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return this.getHandler().injectItems( input, mode, 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();
|
||||
|
||||
if( extraction )
|
||||
{
|
||||
diff.setStackSize( leftOvers == null ? 0 : -leftOvers.getStackSize() );
|
||||
}
|
||||
else if( leftOvers != null )
|
||||
{
|
||||
diff.decStackSize( leftOvers.getStackSize() );
|
||||
}
|
||||
|
||||
if( diff.getStackSize() != 0 )
|
||||
{
|
||||
this.postChangesToListeners( ImmutableList.of( diff ), src );
|
||||
}
|
||||
|
||||
return leftOvers;
|
||||
}
|
||||
@@ -118,9 +126,13 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
Entry<IMEMonitorHandlerReceiver<StackType>, Object> o = i.next();
|
||||
IMEMonitorHandlerReceiver<StackType> receiver = o.getKey();
|
||||
if( receiver.isValid( o.getValue() ) )
|
||||
{
|
||||
receiver.postChange( this, diff, src );
|
||||
}
|
||||
else
|
||||
{
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +145,9 @@ public class MEMonitorHandler<StackType extends IAEStack> implements IMEMonitor<
|
||||
public StackType extractItems( StackType request, Actionable mode, BaseActionSource src )
|
||||
{
|
||||
if( mode == Actionable.SIMULATE )
|
||||
{
|
||||
return this.getHandler().extractItems( request, mode, src );
|
||||
}
|
||||
return this.monitorDifference( request.copy(), this.getHandler().extractItems( request, mode, src ), true, src );
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,12 @@ public enum StorageChannel
|
||||
public IItemList createList()
|
||||
{
|
||||
if( this == ITEMS )
|
||||
{
|
||||
return AEApi.instance().storage().createItemList();
|
||||
}
|
||||
else
|
||||
{
|
||||
return AEApi.instance().storage().createFluidList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,22 +105,34 @@ public class WorldCoord
|
||||
int zlen = Math.abs( oz );
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.EAST, xlen ) ) )
|
||||
{
|
||||
return ForgeDirection.EAST;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.WEST, xlen ) ) )
|
||||
{
|
||||
return ForgeDirection.WEST;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.NORTH, zlen ) ) )
|
||||
{
|
||||
return ForgeDirection.NORTH;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.SOUTH, zlen ) ) )
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.UP, ylen ) ) )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
}
|
||||
|
||||
if( loc.isEqual( this.copy().add( ForgeDirection.DOWN, ylen ) ) )
|
||||
{
|
||||
return ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -117,13 +117,21 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
super( mat );
|
||||
|
||||
if( mat == AEGlassMaterial.INSTANCE || mat == Material.glass )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeGlass );
|
||||
}
|
||||
else if( mat == Material.rock )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeStone );
|
||||
}
|
||||
else if( mat == Material.wood )
|
||||
{
|
||||
this.setStepSound( Block.soundTypeWood );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.setStepSound( Block.soundTypeMetal );
|
||||
}
|
||||
|
||||
this.featureFullName = new FeatureNameExtractor( c, subName ).get();
|
||||
this.featureSubName = subName;
|
||||
@@ -152,7 +160,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
public BlockRenderInfo getRendererInstance()
|
||||
{
|
||||
if( this.renderInfo != null )
|
||||
{
|
||||
return this.renderInfo;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -243,7 +253,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
public IIcon getIcon( int direction, int metadata )
|
||||
{
|
||||
if( this.renderIcon != null )
|
||||
{
|
||||
return this.renderIcon;
|
||||
}
|
||||
|
||||
return this.getRendererInstance().getTexture( ForgeDirection.getOrientation( direction ) );
|
||||
}
|
||||
@@ -256,12 +268,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
ICustomCollision collisionHandler = null;
|
||||
|
||||
if( this instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) this;
|
||||
}
|
||||
else
|
||||
{
|
||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||
if( te instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) te;
|
||||
}
|
||||
}
|
||||
|
||||
if( collisionHandler != null && bb != null )
|
||||
@@ -277,11 +293,15 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
b.maxY += y;
|
||||
b.maxZ += z;
|
||||
if( bb.intersectsWith( b ) )
|
||||
{
|
||||
out.add( b );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.addCollisionBoxesToList( w, x, y, z, bb, out, e );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -292,12 +312,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
AxisAlignedBB b = null;
|
||||
|
||||
if( this instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) this;
|
||||
}
|
||||
else
|
||||
{
|
||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||
if( te instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) te;
|
||||
}
|
||||
}
|
||||
|
||||
if( collisionHandler != null )
|
||||
@@ -345,7 +369,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
for( AxisAlignedBB bx : collisionHandler.getSelectedBoundingBoxesFromPool( w, x, y, z, null, false ) )
|
||||
{
|
||||
if( b == null )
|
||||
{
|
||||
b = bx;
|
||||
}
|
||||
else
|
||||
{
|
||||
double minX = Math.min( b.minX, bx.minX );
|
||||
@@ -361,7 +387,9 @@ 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 );
|
||||
}
|
||||
else
|
||||
{
|
||||
b = super.getSelectedBoundingBoxFromPool( w, x, y, z );
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
@@ -378,12 +406,16 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
ICustomCollision collisionHandler = null;
|
||||
|
||||
if( this instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) this;
|
||||
}
|
||||
else
|
||||
{
|
||||
AEBaseTile te = this.getTileEntity( w, x, y, z );
|
||||
if( te instanceof ICustomCollision )
|
||||
{
|
||||
collisionHandler = (ICustomCollision) te;
|
||||
}
|
||||
}
|
||||
|
||||
if( collisionHandler != null )
|
||||
@@ -444,10 +476,14 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );
|
||||
|
||||
if( tile == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( tile instanceof TileCableBus || tile instanceof TileSkyChest )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ItemStack op = new ItemStack( this );
|
||||
for( ItemStack ol : drops )
|
||||
@@ -456,7 +492,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
|
||||
if( tag != null )
|
||||
{
|
||||
ol.setTagCompound( tag );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,7 +537,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||
}
|
||||
else
|
||||
{
|
||||
memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -521,7 +561,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
TileEntity te = this.getTileEntity( w, x, y, z );
|
||||
if( te instanceof AEBaseTile )
|
||||
{
|
||||
( (AEBaseTile) w.getTileEntity( x, y, z ) ).setName( is.getDisplayName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -544,7 +586,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
TileEntity te = this.getTileEntity( w, x, y, z );
|
||||
if( te instanceof IInventory )
|
||||
{
|
||||
return Container.calcRedstoneFromInventory( (IInventory) te );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -678,7 +722,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
// if the input is an flippable IIcon find the original.
|
||||
while( substitute instanceof FlippableIcon )
|
||||
{
|
||||
substitute = ( (FlippableIcon) substitute ).getOriginal();
|
||||
}
|
||||
|
||||
if( substitute != null )
|
||||
{
|
||||
@@ -689,7 +735,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
|
||||
IResource res = Minecraft.getMinecraft().getResourceManager().getResource( resLoc );
|
||||
if( res != null )
|
||||
{
|
||||
return new FlippableIcon( ir.registerIcon( Name ) );
|
||||
}
|
||||
}
|
||||
catch( Throwable e )
|
||||
{
|
||||
@@ -731,11 +779,15 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
public <T extends TileEntity> T getTileEntity( IBlockAccess w, int x, int y, int z )
|
||||
{
|
||||
if( !this.hasBlockTileEntity() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
TileEntity te = w.getTileEntity( x, y, z );
|
||||
if( this.tileEntityType.isInstance( te ) )
|
||||
{
|
||||
return (T) te;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -754,30 +806,48 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
ForgeDirection west = ForgeDirection.UNKNOWN;
|
||||
|
||||
if( forward == null || up == null )
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
|
||||
int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
||||
int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
||||
int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
||||
|
||||
for( ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||
{
|
||||
west = dx;
|
||||
}
|
||||
}
|
||||
|
||||
if( dir == forward )
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
if( dir == forward.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.NORTH;
|
||||
}
|
||||
|
||||
if( dir == up )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
}
|
||||
if( dir == up.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
if( dir == west )
|
||||
{
|
||||
return ForgeDirection.WEST;
|
||||
}
|
||||
if( dir == west.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.EAST;
|
||||
}
|
||||
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
@@ -823,9 +893,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
{
|
||||
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
if( te.dropItems() )
|
||||
{
|
||||
te.getDrops( w, x, y, z, drops );
|
||||
}
|
||||
else
|
||||
{
|
||||
te.getNoDrops( w, x, y, z, drops );
|
||||
}
|
||||
|
||||
// Cry ;_; ...
|
||||
Platform.spawnDrops( w, x, y, z, drops );
|
||||
@@ -833,7 +907,9 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
||||
|
||||
super.breakBlock( w, x, y, z, a, b );
|
||||
if( te != null )
|
||||
{
|
||||
w.setTileEntity( x, y, z, null );
|
||||
}
|
||||
}
|
||||
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
|
||||
@@ -56,14 +56,18 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
this.hasSubtypes = this.blockType.hasSubtypes;
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
MinecraftForgeClient.registerItemRenderer( this, ItemRenderer.INSTANCE );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata( int dmg )
|
||||
{
|
||||
if( this.hasSubtypes )
|
||||
{
|
||||
return dmg;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -107,17 +111,25 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
{
|
||||
up = ForgeDirection.getOrientation( side );
|
||||
if( up == ForgeDirection.UP || up == ForgeDirection.DOWN )
|
||||
{
|
||||
forward = ForgeDirection.SOUTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
forward = ForgeDirection.UP;
|
||||
}
|
||||
}
|
||||
else if( this.blockType instanceof BlockWireless || this.blockType instanceof BlockSkyCompass )
|
||||
{
|
||||
forward = ForgeDirection.getOrientation( side );
|
||||
if( forward == ForgeDirection.UP || forward == ForgeDirection.DOWN )
|
||||
{
|
||||
up = ForgeDirection.SOUTH;
|
||||
}
|
||||
else
|
||||
{
|
||||
up = ForgeDirection.UP;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -161,11 +173,15 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
up = ForgeDirection.getOrientation( side );
|
||||
forward = ForgeDirection.SOUTH;
|
||||
if( up.offsetY == 0 )
|
||||
{
|
||||
forward = ForgeDirection.UP;
|
||||
}
|
||||
}
|
||||
|
||||
if( !this.blockType.isValidOrientation( w, x, y, z, forward, up ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
|
||||
{
|
||||
@@ -175,13 +191,17 @@ public class AEBaseItemBlock extends ItemBlock
|
||||
ori = tile;
|
||||
|
||||
if( tile == null )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if( ori.canBeRotated() && !this.blockType.hasCustomRotation() )
|
||||
{
|
||||
if( ori.getForward() == null || ori.getUp() == null || // null
|
||||
tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
ori.setOrientation( forward, up );
|
||||
}
|
||||
}
|
||||
|
||||
if( tile instanceof IGridProxyable )
|
||||
|
||||
@@ -89,13 +89,19 @@ public class BlockCraftingStorage extends BlockCraftingUnit
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
return "tile.appliedenergistics2.BlockCraftingStorage4k";
|
||||
}
|
||||
|
||||
if( is.getItemDamage() == 2 )
|
||||
{
|
||||
return "tile.appliedenergistics2.BlockCraftingStorage16k";
|
||||
}
|
||||
|
||||
if( is.getItemDamage() == 3 )
|
||||
{
|
||||
return "tile.appliedenergistics2.BlockCraftingStorage64k";
|
||||
}
|
||||
|
||||
return this.getItemUnlocalizedName( is );
|
||||
}
|
||||
|
||||
@@ -94,7 +94,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||
if( tg != null && !p.isSneaking() && tg.isFormed() && tg.isActive() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CRAFTING_CPU );
|
||||
return true;
|
||||
@@ -124,7 +126,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||
{
|
||||
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
||||
if( cp != null )
|
||||
{
|
||||
cp.breakCluster();
|
||||
}
|
||||
|
||||
super.breakBlock( w, x, y, z, a, b );
|
||||
}
|
||||
@@ -133,7 +137,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
return "tile.appliedenergistics2.BlockCraftingAccelerator";
|
||||
}
|
||||
|
||||
return this.getItemUnlocalizedName( is );
|
||||
}
|
||||
@@ -148,7 +154,9 @@ public class BlockCraftingUnit extends AEBaseBlock
|
||||
{
|
||||
TileCraftingTile cp = this.getTileEntity( w, x, y, z );
|
||||
if( cp != null )
|
||||
{
|
||||
cp.updateMultiBlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -117,10 +117,12 @@ public class BlockCrank extends AEBaseBlock
|
||||
private ForgeDirection findCrankable( World world, int x, int y, int z )
|
||||
{
|
||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( this.isCrankable( world, x, y, z, dir ) )
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,13 +47,17 @@ public class BlockCellWorkbench extends AEBaseBlock
|
||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileCellWorkbench tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_CELL_WORKBENCH );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( r.nextFloat() < 0.98 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
||||
if( tile instanceof TileCharger )
|
||||
|
||||
@@ -47,7 +47,9 @@ public class BlockCondenser extends AEBaseBlock
|
||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileInscriber tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INSCRIBER );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileInterface tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_INTERFACE );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -46,7 +46,9 @@ public class BlockLightDetector extends BlockQuartzTorch
|
||||
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() )
|
||||
{
|
||||
return ( (World) w ).getBlockLightValue( x, y, z ) - 6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -58,7 +60,9 @@ public class BlockLightDetector extends BlockQuartzTorch
|
||||
|
||||
TileLightDetector tld = this.getTileEntity( world, x, y, z );
|
||||
if( tld != null )
|
||||
{
|
||||
tld.updateLight();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -88,7 +88,9 @@ public class BlockPaint extends AEBaseBlock
|
||||
TilePaint tp = this.getTileEntity( w, x, y, z );
|
||||
|
||||
if( tp != null )
|
||||
{
|
||||
tp.onNeighborBlockChange();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,7 +109,9 @@ public class BlockPaint extends AEBaseBlock
|
||||
public void fillWithRain( World w, int x, int y, int z )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
w.setBlock( x, y, z, Platform.AIR, 0, 3 );
|
||||
}
|
||||
}
|
||||
|
||||
@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 )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileQuartzGrowthAccelerator tileQuartzGrowthAccelerator = this.getTileEntity( w, x, y, z );
|
||||
|
||||
@@ -98,25 +100,33 @@ public class BlockQuartzGrowthAccelerator extends AEBaseBlock implements IOrient
|
||||
dx = 0.6;
|
||||
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 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
dx = d1;
|
||||
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 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
dx = d1;
|
||||
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 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
dx = -0.6;
|
||||
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 ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( r.nextFloat() < 0.98 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ForgeDirection up = this.getOrientable( w, x, y, z ).getUp();
|
||||
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();
|
||||
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( World w, int x, int y, int z )
|
||||
@@ -146,8 +152,12 @@ public class BlockQuartzTorch extends AEBaseBlock implements IOrientableBlock, I
|
||||
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
||||
{
|
||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( this.canPlaceAt( w, x, y, z, dir ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileSecurity tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SECURITY );
|
||||
return true;
|
||||
|
||||
@@ -80,7 +80,9 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
TileSkyCompass sc = this.getTileEntity( w, x, y, z );
|
||||
if( sc != null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
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 );
|
||||
ForgeDirection up = sc.getForward();
|
||||
if( !this.canPlaceAt( w, x, y, z, up.getOpposite() ) )
|
||||
{
|
||||
this.dropTorch( w, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
private void dropTorch( World w, int x, int y, int z )
|
||||
@@ -109,8 +113,12 @@ public class BlockSkyCompass extends AEBaseBlock implements ICustomCollision
|
||||
public boolean canPlaceBlockAt( World w, int x, int y, int z )
|
||||
{
|
||||
for( ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( this.canPlaceAt( w, x, y, z, dir ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import appeng.tile.misc.TileVibrationChamber;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockVibrationChamber extends AEBaseBlock
|
||||
public final class BlockVibrationChamber extends AEBaseBlock
|
||||
{
|
||||
|
||||
public BlockVibrationChamber()
|
||||
@@ -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 )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AEBaseTile tile = this.getTileEntity( w, x, y, z );
|
||||
if( tile instanceof TileVibrationChamber )
|
||||
|
||||
@@ -119,7 +119,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
public int getRenderBlockPass()
|
||||
{
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -162,7 +164,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
return block.getLightValue( world, x, y, z );
|
||||
}
|
||||
if( block == null )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
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 );
|
||||
if( tile != null )
|
||||
{
|
||||
tile.disableDrops();
|
||||
}
|
||||
// maybe ray trace?
|
||||
}
|
||||
return super.removedByPlayer( world, player, x, y, z );
|
||||
@@ -224,7 +230,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
BusRenderHelper.INSTANCE.setPass( pass );
|
||||
|
||||
if( AEConfig.instance.isFeatureEnabled( AEFeature.AlphaPass ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return pass == 0;
|
||||
}
|
||||
@@ -236,9 +244,13 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
SelectedPart sp = this.cb( world, x, y, z ).selectPart( v3 );
|
||||
|
||||
if( sp.part != null )
|
||||
{
|
||||
return sp.part.getItemStack( PartItemStack.Pick );
|
||||
}
|
||||
else if( sp.facade != null )
|
||||
{
|
||||
return sp.facade.getItemStack();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -258,7 +270,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
IIcon ico = this.getIcon( p );
|
||||
|
||||
if( ico == null )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
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 );
|
||||
|
||||
if( ico == null )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
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 )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
this.cb( w, x, y, z ).onNeighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private IIcon getIcon( IPart p )
|
||||
{
|
||||
if( p == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
IIcon ico = p.getBreakingTexture();
|
||||
if( ico != null )
|
||||
{
|
||||
return ico;
|
||||
}
|
||||
}
|
||||
catch( Throwable t )
|
||||
{
|
||||
@@ -356,7 +378,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
|
||||
ItemStack is = p.getItemStack( PartItemStack.Network );
|
||||
if( is == null || is.getItem() == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return is.getItem().getIcon( is, 0 );
|
||||
}
|
||||
@@ -367,10 +391,13 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
ICableBusContainer out = null;
|
||||
|
||||
if( te instanceof TileCableBus )
|
||||
{
|
||||
out = ( (TileCableBus) te ).cb;
|
||||
|
||||
}
|
||||
else if( AppEng.instance.isIntegrationEnabled( IntegrationType.FMP ) )
|
||||
{
|
||||
out = ( (IFMP) AppEng.instance.getIntegration( IntegrationType.FMP ) ).getCableContainer( te );
|
||||
}
|
||||
|
||||
return out == null ? NULL_CABLE_BUS : out;
|
||||
}
|
||||
@@ -392,7 +419,9 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
{
|
||||
IIcon i = super.getIcon( direction, metadata );
|
||||
if( i != null )
|
||||
{
|
||||
return i;
|
||||
}
|
||||
|
||||
return ExtraBlockTextures.BlockQuartzGlassB.getIcon();
|
||||
}
|
||||
@@ -440,10 +469,14 @@ public class BlockCableBus extends AEBaseBlock implements IRedNetConnection
|
||||
TileEntity te = w.getTileEntity( x, y, z );
|
||||
|
||||
if( noTesrTile.isInstance( te ) )
|
||||
{
|
||||
return (T) te;
|
||||
}
|
||||
|
||||
if( tesrTile != null && tesrTile.isInstance( te ) )
|
||||
{
|
||||
return (T) te;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,9 @@ public class BlockController extends AEBaseBlock
|
||||
{
|
||||
TileController tc = this.getTileEntity( w, x, y, z );
|
||||
if( tc != null )
|
||||
{
|
||||
tc.onNeighborChange( false );
|
||||
}
|
||||
}
|
||||
|
||||
@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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileWireless tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_WIRELESS );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -197,6 +201,8 @@ public class BlockWireless extends AEBaseBlock implements ICustomCollision
|
||||
out.add( AxisAlignedBB.getBoundingBox( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
out.add( AxisAlignedBB.getBoundingBox( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,9 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
||||
if( bridge.hasQES() )
|
||||
{
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
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 );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.neighborUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileQuantumBridge tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_QNB );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -111,7 +119,9 @@ public class BlockQuantumLinkChamber extends AEBaseBlock implements ICustomColli
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.breakCluster();
|
||||
}
|
||||
|
||||
super.breakBlock( w, x, y, z, a, b );
|
||||
}
|
||||
|
||||
@@ -56,7 +56,9 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.neighborUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +72,9 @@ public class BlockQuantumRing extends AEBaseBlock implements ICustomCollision
|
||||
{
|
||||
TileQuantumBridge bridge = this.getTileEntity( w, x, y, z );
|
||||
if( bridge != null )
|
||||
{
|
||||
bridge.breakCluster();
|
||||
}
|
||||
|
||||
super.breakBlock( w, x, y, z, a, b );
|
||||
}
|
||||
|
||||
@@ -64,7 +64,9 @@ public class BlockQuartzGlass extends AEBaseBlock
|
||||
if( mat == Material.glass || mat == AEGlassMaterial.INSTANCE )
|
||||
{
|
||||
if( w.getBlock( x, y, z ).getRenderType() == this.getRenderType() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return super.shouldSideBeRendered( w, x, y, z, side );
|
||||
}
|
||||
|
||||
@@ -50,7 +50,9 @@ public class BlockQuartzLamp extends BlockQuartzGlass
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
{
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( CommonHelper.proxy.shouldAddParticles( r ) )
|
||||
{
|
||||
|
||||
@@ -90,10 +90,14 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
int level = -1;
|
||||
|
||||
if( is != null )
|
||||
{
|
||||
level = is.getItem().getHarvestLevel( is, "pickaxe" );
|
||||
}
|
||||
|
||||
if( Ev.metadata > 0 || level >= 3 || Ev.originalSpeed > 7.0 )
|
||||
{
|
||||
Ev.newSpeed /= 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +121,9 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
{
|
||||
super.onBlockAdded( w, x, y, z );
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
||||
}
|
||||
}
|
||||
|
||||
// use AE2's renderer, no rotatable blocks.
|
||||
@@ -142,12 +148,16 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
{
|
||||
IOrientable out = ( (IRB) AppEng.instance.getIntegration( IntegrationType.RB ) ).getOrientable( te );
|
||||
if( out != null )
|
||||
{
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( w.getBlockMetadata( x, y, z ) == 0 )
|
||||
{
|
||||
return new LocationRotation( w, x, y, z );
|
||||
}
|
||||
|
||||
return new NullRotation();
|
||||
}
|
||||
@@ -156,13 +166,19 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Block";
|
||||
}
|
||||
|
||||
if( is.getItemDamage() == 2 )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Brick";
|
||||
}
|
||||
|
||||
if( is.getItemDamage() == 3 )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".SmallBrick";
|
||||
}
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
@@ -182,11 +198,17 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
public IIcon getIcon( int direction, int metadata )
|
||||
{
|
||||
if( metadata == 1 )
|
||||
{
|
||||
return this.Block;
|
||||
}
|
||||
if( metadata == 2 )
|
||||
{
|
||||
return this.Brick;
|
||||
}
|
||||
if( metadata == 3 )
|
||||
{
|
||||
return this.SmallBrick;
|
||||
}
|
||||
return super.getIcon( direction, metadata );
|
||||
}
|
||||
|
||||
@@ -212,6 +234,8 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
||||
{
|
||||
super.breakBlock( w, x, y, z, b, WTF );
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
WorldSettings.getInstance().getCompass().updateArea( w, x, y, z );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -29,7 +29,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.exceptions.MissingDefinition;
|
||||
@@ -67,12 +66,6 @@ public class OreQuartz extends AEBaseBlock
|
||||
return RenderQuartzOre.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
OreDictionary.registerOre( "oreCertusQuartz", new ItemStack( this ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMixedBrightnessForBlock( IBlockAccess par1iBlockAccess, int par2, int par3, int par4 )
|
||||
{
|
||||
@@ -91,7 +84,9 @@ public class OreQuartz extends AEBaseBlock
|
||||
}
|
||||
|
||||
if( j1 > 15 )
|
||||
{
|
||||
j1 = 15;
|
||||
}
|
||||
return j1 << 20 | j1 << 4;
|
||||
}
|
||||
return j1;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.block.solids;
|
||||
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
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 )
|
||||
{
|
||||
if ( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
double xOff = ( r.nextFloat() );
|
||||
double yOff = ( r.nextFloat() );
|
||||
|
||||
@@ -49,20 +49,26 @@ public class BlockSpatialIOPort extends AEBaseBlock
|
||||
{
|
||||
TileSpatialIOPort te = this.getTileEntity( w, x, y, z );
|
||||
if( te != null )
|
||||
{
|
||||
te.updateRedstoneState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileSpatialIOPort tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_SPATIAL_IO_PORT );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -48,7 +48,9 @@ public class BlockSpatialPylon extends AEBaseBlock
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||
if( tsp != null )
|
||||
{
|
||||
tsp.onNeighborBlockChange();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,7 +58,9 @@ public class BlockSpatialPylon extends AEBaseBlock
|
||||
{
|
||||
TileSpatialPylon tsp = this.getTileEntity( w, x, y, z );
|
||||
if( tsp != null )
|
||||
{
|
||||
return tsp.getLightValue();
|
||||
}
|
||||
return super.getLightValue( w, x, y, z );
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,9 @@ public class BlockChest extends AEBaseBlock
|
||||
if( tg != null && !p.isSneaking() )
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if( side != tg.getUp().ordinal() )
|
||||
{
|
||||
@@ -78,7 +80,9 @@ public class BlockChest extends AEBaseBlock
|
||||
tg.openGui( p, ch, cell, side );
|
||||
}
|
||||
else
|
||||
{
|
||||
p.addChatMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileDrive tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_DRIVE );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -49,20 +49,26 @@ public class BlockIOPort extends AEBaseBlock
|
||||
{
|
||||
TileIOPort te = this.getTileEntity( w, x, y, z );
|
||||
if( te != null )
|
||||
{
|
||||
te.updateRedstoneState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TileIOPort tg = this.getTileEntity( w, x, y, z );
|
||||
if( tg != null )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( p, tg, ForgeDirection.getOrientation( side ), GuiBridge.GUI_IOPORT );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
Platform.openGUI( player, this.getTileEntity( w, x, y, z ), ForgeDirection.getOrientation( side ), GuiBridge.GUI_SKYCHEST );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -127,7 +129,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
||||
public String getUnlocalizedName( ItemStack is )
|
||||
{
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
return this.getUnlocalizedName() + ".Block";
|
||||
}
|
||||
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
@@ -140,7 +144,9 @@ public class BlockSkyChest extends AEBaseBlock implements ICustomCollision
|
||||
ForgeDirection o = ForgeDirection.UNKNOWN;
|
||||
|
||||
if( sk != null )
|
||||
{
|
||||
o = sk.getUp();
|
||||
}
|
||||
|
||||
double X = o.offsetX == 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()
|
||||
{
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return Minecraft.getMinecraft().theWorld;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.getWorld();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +133,9 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
BaseBlockRender bbr = blk.getRendererInstance().rendererInstance;
|
||||
if( bbr.hasTESR() && tile != null )
|
||||
{
|
||||
ClientRegistry.bindTileEntitySpecialRenderer( tile, new TESRWrapper( bbr ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -142,7 +148,9 @@ public class ClientHelper extends ServerHelper
|
||||
return o;
|
||||
}
|
||||
else
|
||||
{
|
||||
return super.getPlayers();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -243,9 +251,13 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
int setting = Minecraft.getMinecraft().gameSettings.particleSetting;
|
||||
if( setting == 2 )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( setting == 0 )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return r.nextInt( 2 * ( setting + 1 ) ) == 0;
|
||||
}
|
||||
|
||||
@@ -347,7 +359,9 @@ public class ClientHelper extends ServerHelper
|
||||
public CableRenderMode getRenderMode()
|
||||
{
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
return super.getRenderMode();
|
||||
}
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
@@ -360,7 +374,9 @@ public class ClientHelper extends ServerHelper
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if( mc == null || mc.thePlayer == null || mc.theWorld == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
|
||||
@@ -383,7 +399,9 @@ public class ClientHelper extends ServerHelper
|
||||
public void wheelEvent( MouseEvent me )
|
||||
{
|
||||
if( me.isCanceled() || me.dwheel == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
@@ -409,16 +427,22 @@ public class ClientHelper extends ServerHelper
|
||||
if( ev.map.getTextureType() == 1 )
|
||||
{
|
||||
for( ExtraItemTextures et : ExtraItemTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
}
|
||||
}
|
||||
|
||||
if( ev.map.getTextureType() == 0 )
|
||||
{
|
||||
for( ExtraBlockTextures et : ExtraBlockTextures.values() )
|
||||
{
|
||||
et.registerIcon( ev.map );
|
||||
}
|
||||
|
||||
for( CableBusTextures cb : CableBusTextures.values() )
|
||||
{
|
||||
cb.registerIcon( ev.map );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,11 +136,17 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
Iterator<Slot> i = slots.iterator();
|
||||
while( i.hasNext() )
|
||||
{
|
||||
if( i.next() instanceof SlotME )
|
||||
{
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
|
||||
for( InternalSlotME me : this.meSlots )
|
||||
{
|
||||
slots.add( new SlotME( me ) );
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings( "unchecked" )
|
||||
@@ -156,7 +162,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
boolean hasClicked = Mouse.isButtonDown( 0 );
|
||||
if( hasClicked && this.myScrollBar != null )
|
||||
{
|
||||
this.myScrollBar.click( this, mouse_x - this.guiLeft, mouse_y - this.guiTop );
|
||||
}
|
||||
|
||||
for( Object c : this.buttonList )
|
||||
{
|
||||
@@ -171,11 +179,15 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if( y < mouse_y && y + tooltip.getHeight() > mouse_y )
|
||||
{
|
||||
if( y < 15 )
|
||||
{
|
||||
y = 15;
|
||||
}
|
||||
|
||||
String msg = tooltip.getMessage();
|
||||
if( msg != null )
|
||||
{
|
||||
this.drawTooltip( x + 11, y + 4, 0, msg );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -222,7 +234,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
|
||||
if( forceWidth > 0 )
|
||||
{
|
||||
var5 = forceWidth;
|
||||
}
|
||||
|
||||
this.zLevel = 300.0F;
|
||||
itemRender.zLevel = 300.0F;
|
||||
@@ -276,7 +290,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
|
||||
if( this.myScrollBar != null )
|
||||
{
|
||||
this.myScrollBar.draw( this );
|
||||
}
|
||||
|
||||
this.drawFG( ox, oy, x, y );
|
||||
}
|
||||
@@ -357,7 +373,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.mouseClickMove( x, y, c, d );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -370,7 +388,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
final InventoryAction action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
|
||||
|
||||
if( this.drag_click.size() > 1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
@@ -381,7 +401,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
if( slot instanceof SlotPatternTerm )
|
||||
{
|
||||
if( key == 6 )
|
||||
{
|
||||
return; // prevent weird double clicks..
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
@@ -395,13 +417,19 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
else if( slot instanceof SlotCraftingTerm )
|
||||
{
|
||||
if( key == 6 )
|
||||
{
|
||||
return; // prevent weird double clicks..
|
||||
}
|
||||
|
||||
InventoryAction action = null;
|
||||
if( key == 1 )
|
||||
{
|
||||
action = InventoryAction.CRAFT_SHIFT;
|
||||
}
|
||||
else
|
||||
{
|
||||
action = ctrlDown == 1 ? InventoryAction.CRAFT_STACK : InventoryAction.CRAFT_ITEM;
|
||||
}
|
||||
|
||||
PacketInventoryAction p = new PacketInventoryAction( action, slotIdx, 0 );
|
||||
NetworkHandler.instance.sendToServer( p );
|
||||
@@ -415,12 +443,16 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
{
|
||||
IAEItemStack stack = null;
|
||||
if( slot instanceof SlotME )
|
||||
{
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
}
|
||||
|
||||
int slotNum = this.getInventorySlots().size();
|
||||
|
||||
if( !( slot instanceof SlotME ) && slot != null )
|
||||
{
|
||||
slotNum = slot.slotNumber;
|
||||
}
|
||||
|
||||
( (AEBaseContainer) this.inventorySlots ).setTargetStack( stack );
|
||||
PacketInventoryAction p = new PacketInventoryAction( InventoryAction.MOVE_REGION, slotNum, 0 );
|
||||
@@ -477,7 +509,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
|
||||
if( stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack() == null )
|
||||
{
|
||||
action = InventoryAction.AUTO_CRAFT;
|
||||
}
|
||||
|
||||
break;
|
||||
case 1:
|
||||
@@ -489,8 +523,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
|
||||
stack = ( (SlotME) slot ).getAEStack();
|
||||
if( stack != null && stack.isCraftable() )
|
||||
{
|
||||
action = InventoryAction.AUTO_CRAFT;
|
||||
|
||||
}
|
||||
else if( player.capabilities.isCreativeMode )
|
||||
{
|
||||
IAEItemStack slotItem = ( (SlotME) slot ).getAEStack();
|
||||
@@ -526,9 +561,13 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.bl_clicked = slot;
|
||||
this.dbl_clickTimer = Stopwatch.createStarted();
|
||||
if( slot != null )
|
||||
{
|
||||
this.dbl_whichItem = slot.getHasStack() ? slot.getStack().copy() : null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.dbl_whichItem = null;
|
||||
}
|
||||
}
|
||||
else if( this.dbl_whichItem != null )
|
||||
{
|
||||
@@ -642,7 +681,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.mouseWheelEvent( x, y, i / Math.abs( i ) );
|
||||
}
|
||||
else if( i != 0 && this.myScrollBar != null )
|
||||
{
|
||||
this.myScrollBar.wheel( i );
|
||||
}
|
||||
}
|
||||
|
||||
protected void mouseWheelEvent( int x, int y, int wheel )
|
||||
@@ -702,7 +743,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
private boolean hasCustomInventoryName()
|
||||
{
|
||||
if( this.inventorySlots instanceof AEBaseContainer )
|
||||
{
|
||||
return ( (AEBaseContainer) this.inventorySlots ).customName != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -835,7 +878,9 @@ public abstract class AEBaseGui extends GuiContainer
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.safeDrawSlot( s );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,10 +121,14 @@ public abstract class AEBaseMEGui extends AEBaseGui
|
||||
List<String> currentToolTip = stack.getTooltip( this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips );
|
||||
|
||||
if( myStack.getStackSize() > BigNumber || ( myStack.getStackSize() > 1 && stack.isItemDamaged() ) )
|
||||
{
|
||||
currentToolTip.add( "Items Stored: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getStackSize() ) );
|
||||
}
|
||||
|
||||
if( myStack.getCountRequestable() > 0 )
|
||||
{
|
||||
currentToolTip.add( "Items Requestable: " + NumberFormat.getNumberInstance( Locale.US ).format( myStack.getCountRequestable() ) );
|
||||
}
|
||||
|
||||
this.drawTooltip( x, y, 0, join( currentToolTip, "\n" ) );
|
||||
}
|
||||
|
||||
@@ -48,15 +48,21 @@ public class AEConfigGui extends GuiConfig
|
||||
for( String cat : AEConfig.instance.getCategoryNames() )
|
||||
{
|
||||
if( cat.equals( "versionchecker" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( cat.equals( "settings" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigCategory cc = AEConfig.instance.getCategory( cat );
|
||||
|
||||
if( cc.isChild() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
ConfigElement ce = new ConfigElement( cc );
|
||||
list.add( ce );
|
||||
|
||||
@@ -98,9 +98,13 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
int dx = this.workbench.availableUpgrades() - 8;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if( dx == 8 )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -113,13 +117,19 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
int dx = this.workbench.availableUpgrades() - 16;
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY, 186, 0, 35 - 8, 7 + dx * 18 );
|
||||
if( dx == 8 )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18, offsetY + ( 7 + ( dx ) * 18 ), 186, 151, 35 - 8, 7 );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177 + 27 + 18 + 4, offsetY + ( 7 + ( dx ) * 18 ), 186 + 4, 151, 35 - 8, 7 );
|
||||
}
|
||||
}
|
||||
}
|
||||
if( this.hasToolbox() )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, 161, 68, 68 );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -135,7 +145,9 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
if( is != null && is.getItem() instanceof IUpgradeModule )
|
||||
{
|
||||
if( ( (IUpgradeModule) is.getItem() ).getType( is ) == Upgrades.FUZZY )
|
||||
{
|
||||
hasFuzzy = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.fuzzyMode.setVisibility( hasFuzzy );
|
||||
@@ -186,7 +198,9 @@ public class GuiCellWorkbench extends GuiUpgradeable
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "CellWorkbench.Fuzzy", fz.name() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
super.actionPerformed( btn );
|
||||
}
|
||||
}
|
||||
catch( IOException ignored )
|
||||
{
|
||||
|
||||
@@ -197,10 +197,14 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
if( fixed )
|
||||
{
|
||||
this.amountToCraft.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
long result = Long.parseLong( out );
|
||||
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;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( int i )
|
||||
@@ -265,19 +271,27 @@ public class GuiCraftAmount extends AEBaseGui
|
||||
}
|
||||
|
||||
if( fixed )
|
||||
{
|
||||
this.amountToCraft.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
long result = Integer.parseInt( out );
|
||||
|
||||
if( result == 1 && i > 1 )
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
|
||||
result += i;
|
||||
if( result < 1 )
|
||||
{
|
||||
result = 1;
|
||||
}
|
||||
|
||||
out = Long.toString( result );
|
||||
Integer.parseInt( out );
|
||||
|
||||
@@ -84,16 +84,24 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
this.ccc = (ContainerCraftConfirm) this.inventorySlots;
|
||||
|
||||
if( te instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
this.OriginalGui = GuiBridge.GUI_WIRELESS_TERM;
|
||||
}
|
||||
|
||||
if( te instanceof PartTerminal )
|
||||
{
|
||||
this.OriginalGui = GuiBridge.GUI_ME;
|
||||
}
|
||||
|
||||
if( te instanceof PartCraftingTerminal )
|
||||
{
|
||||
this.OriginalGui = GuiBridge.GUI_CRAFTING_TERMINAL;
|
||||
}
|
||||
|
||||
if( te instanceof PartPatternTerminal )
|
||||
{
|
||||
this.OriginalGui = GuiBridge.GUI_PATTERN_TERMINAL;
|
||||
}
|
||||
}
|
||||
|
||||
boolean isAutoStart()
|
||||
@@ -115,7 +123,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
this.buttonList.add( this.selectCPU );
|
||||
|
||||
if( this.OriginalGui != null )
|
||||
{
|
||||
this.cancel = new GuiButton( 0, this.guiLeft + 6, this.guiTop + this.ySize - 25, 50, 20, GuiText.Cancel.getLocal() );
|
||||
}
|
||||
|
||||
this.buttonList.add( this.cancel );
|
||||
}
|
||||
@@ -174,11 +184,15 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnTextText = GuiText.CraftingCPU.getLocal() + ": #" + this.ccc.selectedCpu;
|
||||
}
|
||||
}
|
||||
|
||||
if( this.ccc.noCPU )
|
||||
{
|
||||
btnTextText = GuiText.NoCraftingCPUs.getLocal();
|
||||
}
|
||||
|
||||
this.selectCPU.displayString = btnTextText;
|
||||
}
|
||||
@@ -199,9 +213,13 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
String dsp = null;
|
||||
|
||||
if( this.isSimulation() )
|
||||
{
|
||||
dsp = GuiText.Simulation.getLocal();
|
||||
}
|
||||
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";
|
||||
}
|
||||
|
||||
int offset = ( 219 - this.fontRendererObj.getStringWidth( dsp ) ) / 2;
|
||||
this.fontRendererObj.drawString( dsp, offset, 165, 4210752 );
|
||||
@@ -237,11 +255,17 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
int lines = 0;
|
||||
|
||||
if( stored != null && stored.getStackSize() > 0 )
|
||||
{
|
||||
lines++;
|
||||
}
|
||||
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||
{
|
||||
lines++;
|
||||
}
|
||||
if( pendingStack != null && pendingStack.getStackSize() > 0 )
|
||||
{
|
||||
lines++;
|
||||
}
|
||||
|
||||
int negY = ( ( lines - 1 ) * 5 ) / 2;
|
||||
int downY = 0;
|
||||
@@ -251,16 +275,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
String str = Long.toString( stored.getStackSize() );
|
||||
if( stored.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( stored.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.FromStorage.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.FromStorage.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
}
|
||||
|
||||
downY += 5;
|
||||
}
|
||||
@@ -269,16 +299,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
String str = Long.toString( missingStack.getStackSize() );
|
||||
if( missingStack.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( missingStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( missingStack.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( missingStack.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.Missing.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.Missing.getLocal() + ": " + Long.toString( missingStack.getStackSize() ) );
|
||||
}
|
||||
|
||||
red = true;
|
||||
downY += 5;
|
||||
@@ -288,16 +324,22 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
String str = Long.toString( pendingStack.getStackSize() );
|
||||
if( pendingStack.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( pendingStack.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.ToCraft.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.ToCraft.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
@@ -311,7 +353,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
dspToolTip = Platform.getItemDisplayName( is );
|
||||
|
||||
if( lineList.size() > 0 )
|
||||
{
|
||||
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
||||
}
|
||||
|
||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||
toolPosY = y * offY + yo;
|
||||
@@ -366,17 +410,23 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
{
|
||||
case 0:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.storage, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.pending, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.missing, l );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -385,7 +435,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
long amt = this.getTotal( l );
|
||||
|
||||
if( amt <= 0 )
|
||||
{
|
||||
this.deleteVisualStack( l );
|
||||
}
|
||||
else
|
||||
{
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
@@ -403,7 +455,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
if( l.getStackSize() <= 0 )
|
||||
{
|
||||
if( a != null )
|
||||
{
|
||||
a.reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -414,7 +468,9 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
}
|
||||
|
||||
if( a != null )
|
||||
{
|
||||
a.setStackSize( l.getStackSize() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -427,13 +483,19 @@ public class GuiCraftConfirm extends AEBaseGui
|
||||
long total = 0;
|
||||
|
||||
if( a != null )
|
||||
{
|
||||
total += a.getStackSize();
|
||||
}
|
||||
|
||||
if( c != null )
|
||||
{
|
||||
total += c.getStackSize();
|
||||
}
|
||||
|
||||
if( m != null )
|
||||
{
|
||||
total += m.getStackSize();
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
@@ -228,16 +228,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
String str = Long.toString( stored.getStackSize() );
|
||||
if( stored.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( stored.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( stored.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( stored.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.Stored.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.Stored.getLocal() + ": " + Long.toString( stored.getStackSize() ) );
|
||||
}
|
||||
|
||||
downY += 5;
|
||||
}
|
||||
@@ -246,16 +252,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
String str = Long.toString( activeStack.getStackSize() );
|
||||
if( activeStack.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( activeStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( activeStack.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( activeStack.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.Crafting.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.Crafting.getLocal() + ": " + Long.toString( activeStack.getStackSize() ) );
|
||||
}
|
||||
|
||||
downY += 5;
|
||||
}
|
||||
@@ -264,16 +276,22 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
String str = Long.toString( pendingStack.getStackSize() );
|
||||
if( pendingStack.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
if( pendingStack.getStackSize() >= 10000000 )
|
||||
{
|
||||
str = Long.toString( pendingStack.getStackSize() / 1000000 ) + 'm';
|
||||
}
|
||||
|
||||
str = GuiText.Scheduled.getLocal() + ": " + str;
|
||||
int w = 4 + this.fontRendererObj.getStringWidth( str );
|
||||
this.fontRendererObj.drawString( str, (int) ( ( x * ( 1 + sectionLength ) + xo + sectionLength - 19 - ( w * 0.5 ) ) * 2 ), ( y * offY + yo + 6 - negY + downY ) * 2, 4210752 );
|
||||
|
||||
if( this.tooltip == z - viewStart )
|
||||
{
|
||||
lineList.add( GuiText.Scheduled.getLocal() + ": " + Long.toString( pendingStack.getStackSize() ) );
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
@@ -287,7 +305,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
dspToolTip = Platform.getItemDisplayName( is );
|
||||
|
||||
if( lineList.size() > 0 )
|
||||
{
|
||||
dspToolTip = dspToolTip + '\n' + Joiner.on( "\n" ).join( lineList );
|
||||
}
|
||||
|
||||
toolPosX = x * ( 1 + sectionLength ) + xo + sectionLength - 8;
|
||||
toolPosY = y * offY + yo;
|
||||
@@ -326,17 +346,23 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
{
|
||||
case 0:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.storage, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 1:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.active, l );
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
for( IAEItemStack l : list )
|
||||
{
|
||||
this.handleInput( this.pending, l );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -345,7 +371,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
long amt = this.getTotal( l );
|
||||
|
||||
if( amt <= 0 )
|
||||
{
|
||||
this.deleteVisualStack( l );
|
||||
}
|
||||
else
|
||||
{
|
||||
IAEItemStack is = this.findVisualStack( l );
|
||||
@@ -363,7 +391,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
if( l.getStackSize() <= 0 )
|
||||
{
|
||||
if( a != null )
|
||||
{
|
||||
a.reset();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -374,7 +404,9 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
}
|
||||
|
||||
if( a != null )
|
||||
{
|
||||
a.setStackSize( l.getStackSize() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,13 +419,19 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
|
||||
long total = 0;
|
||||
|
||||
if( a != null )
|
||||
{
|
||||
total += a.getStackSize();
|
||||
}
|
||||
|
||||
if( b != null )
|
||||
{
|
||||
total += b.getStackSize();
|
||||
}
|
||||
|
||||
if( c != null )
|
||||
{
|
||||
total += c.getStackSize();
|
||||
}
|
||||
|
||||
return total;
|
||||
}
|
||||
|
||||
@@ -166,11 +166,15 @@ public class GuiCraftingStatus extends GuiCraftingCPU
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": " + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnTextText = GuiText.CPUs.getLocal() + ": #" + this.status.selectedCpu;
|
||||
}
|
||||
}
|
||||
|
||||
if( this.status.noCPU )
|
||||
{
|
||||
btnTextText = GuiText.NoCraftingJobs.getLocal();
|
||||
}
|
||||
|
||||
this.selectCPU.displayString = btnTextText;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,9 @@ public class GuiCraftingTerm extends GuiMEMonitorable
|
||||
for( Object j : c.inventorySlots )
|
||||
{
|
||||
if( j instanceof SlotCraftingMatrix )
|
||||
{
|
||||
s = (Slot) j;
|
||||
}
|
||||
}
|
||||
|
||||
if( s != null )
|
||||
|
||||
@@ -69,10 +69,14 @@ public class GuiFormationPlane extends GuiUpgradeable
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
}
|
||||
|
||||
if( this.placeMode != null )
|
||||
{
|
||||
this.placeMode.set( ( (ContainerFormationPlane) this.cvb ).placeMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,13 +70,19 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.redstoneMode != null )
|
||||
{
|
||||
this.redstoneMode.set( this.cvb.rsMode );
|
||||
}
|
||||
|
||||
if( this.operationMode != null )
|
||||
{
|
||||
this.operationMode.set( ( (ContainerIOPort) this.cvb ).opMode );
|
||||
}
|
||||
|
||||
if( this.fullMode != null )
|
||||
{
|
||||
this.fullMode.set( ( (ContainerIOPort) this.cvb ).fMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,9 +117,13 @@ public class GuiIOPort extends GuiUpgradeable
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.fullMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fullMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.operationMode )
|
||||
{
|
||||
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 );
|
||||
|
||||
if( this.drawUpgrades() )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvc.availableUpgrades() * 18 );
|
||||
}
|
||||
if( this.hasToolbox() )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean drawUpgrades()
|
||||
|
||||
@@ -68,10 +68,14 @@ public class GuiInterface extends GuiUpgradeable
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
if( this.BlockMode != null )
|
||||
{
|
||||
this.BlockMode.set( ( (ContainerInterface) this.cvb ).bMode );
|
||||
}
|
||||
|
||||
if( this.interfaceMode != null )
|
||||
{
|
||||
this.interfaceMode.setState( ( (ContainerInterface) this.cvb ).iTermMode == YesNo.YES );
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.Interface.getLocal() ), 8, 6, 4210752 );
|
||||
|
||||
@@ -101,9 +105,13 @@ public class GuiInterface extends GuiUpgradeable
|
||||
}
|
||||
|
||||
if( btn == this.interfaceMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( Settings.INTERFACE_TERMINAL, backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.BlockMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.BlockMode.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
while( o.hasNext() )
|
||||
{
|
||||
if( o.next() instanceof SlotDisconnected )
|
||||
{
|
||||
o.remove();
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
int rows = this.byName.get( name ).size();
|
||||
if( rows > 1 )
|
||||
{
|
||||
name = name + " (" + rows + ')';
|
||||
}
|
||||
|
||||
while( name.length() > 2 && this.fontRendererObj.getStringWidth( name ) > 155 )
|
||||
{
|
||||
name = name.substring( 0, name.length() - 1 );
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString( name, 10, 6 + offset, 4210752 );
|
||||
}
|
||||
@@ -173,7 +179,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
}
|
||||
|
||||
if( this.searchField != null )
|
||||
{
|
||||
this.searchField.drawTextBox();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -182,7 +190,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.searchField.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
@@ -218,7 +228,9 @@ public class GuiInterfaceTerminal extends AEBaseGui
|
||||
{
|
||||
String which = Integer.toString( x );
|
||||
if( invData.hasKey( which ) )
|
||||
{
|
||||
current.inv.setInventorySlotContents( x, ItemStack.loadItemStackFromNBT( invData.getCompoundTag( which ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException ignored )
|
||||
|
||||
@@ -130,10 +130,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
super.drawFG( offsetX, offsetY, mouseX, mouseY );
|
||||
|
||||
if( this.craftingMode != null )
|
||||
{
|
||||
this.craftingMode.set( ( (ContainerLevelEmitter) this.cvb ).cmType );
|
||||
}
|
||||
|
||||
if( this.levelMode != null )
|
||||
{
|
||||
this.levelMode.set( ( (ContainerLevelEmitter) this.cvb ).lvType );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -170,16 +174,22 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.craftingMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftingMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.levelMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.levelMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( long i )
|
||||
@@ -196,15 +206,21 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
if( Fixed )
|
||||
{
|
||||
this.level.setText( Out );
|
||||
}
|
||||
|
||||
if( Out.length() == 0 )
|
||||
{
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
long result = Long.parseLong( Out );
|
||||
result += i;
|
||||
if( result < 0 )
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
|
||||
this.level.setText( Out = Long.toString( result ) );
|
||||
|
||||
@@ -240,10 +256,14 @@ public class GuiLevelEmitter extends GuiUpgradeable
|
||||
}
|
||||
|
||||
if( Fixed )
|
||||
{
|
||||
this.level.setText( Out );
|
||||
}
|
||||
|
||||
if( Out.length() == 0 )
|
||||
{
|
||||
Out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "LevelEmitter.Value", Out ) );
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.client.gui.implementations;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
@@ -111,7 +112,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.ySize = 204;
|
||||
|
||||
if( te instanceof IViewCellStorage )
|
||||
{
|
||||
this.xSize += 33;
|
||||
}
|
||||
|
||||
this.standardSize = this.xSize;
|
||||
|
||||
@@ -121,21 +124,33 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.viewCell = te instanceof IViewCellStorage;
|
||||
|
||||
if( te instanceof TileSecurity )
|
||||
{
|
||||
this.myName = GuiText.Security;
|
||||
}
|
||||
else if( te instanceof WirelessTerminalGuiObject )
|
||||
{
|
||||
this.myName = GuiText.WirelessTerminal;
|
||||
}
|
||||
else if( te instanceof IPortableCell )
|
||||
{
|
||||
this.myName = GuiText.PortableCell;
|
||||
}
|
||||
else if( te instanceof IMEChest )
|
||||
{
|
||||
this.myName = GuiText.Chest;
|
||||
}
|
||||
else if( te instanceof PartTerminal )
|
||||
{
|
||||
this.myName = GuiText.Terminal;
|
||||
}
|
||||
}
|
||||
|
||||
public void postUpdate( List<IAEItemStack> list )
|
||||
{
|
||||
for( IAEItemStack is : list )
|
||||
{
|
||||
this.repo.postUpdate( is );
|
||||
}
|
||||
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
@@ -166,9 +181,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
Enum next = Platform.rotateEnum( cv, backwards, iBtn.getSetting().getPossibleValues() );
|
||||
|
||||
if( btn == this.terminalStyleBox )
|
||||
{
|
||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||
}
|
||||
else if( btn == this.searchBoxSettings )
|
||||
{
|
||||
AEConfig.instance.settings.putSetting( iBtn.getSetting(), next );
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
@@ -184,7 +203,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
iBtn.set( next );
|
||||
|
||||
if( next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class )
|
||||
{
|
||||
this.re_init();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,6 +219,8 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
Keyboard.enableRepeatEvents( true );
|
||||
|
||||
this.maxRows = this.getMaxRows();
|
||||
this.perRow = AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL ? 9 : 9 + ( ( this.width - this.standardSize ) / 18 );
|
||||
|
||||
@@ -217,10 +240,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
if( hasNEI )
|
||||
{
|
||||
this.rows--;
|
||||
}
|
||||
|
||||
if( this.rows < 3 )
|
||||
{
|
||||
this.rows = 3;
|
||||
}
|
||||
|
||||
this.meSlots.clear();
|
||||
for( int y = 0; y < this.rows; y++ )
|
||||
@@ -232,9 +259,13 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
if( AEConfig.instance.getConfigManager().getSetting( Settings.TERMINAL_STYLE ) != TerminalStyle.FULL )
|
||||
{
|
||||
this.xSize = this.standardSize + ( ( this.perRow - 9 ) * 18 );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.xSize = this.standardSize;
|
||||
}
|
||||
|
||||
super.initGui();
|
||||
// full size : 204
|
||||
@@ -303,7 +334,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if( s instanceof AppEngSlot )
|
||||
{
|
||||
if( ( (AppEngSlot) s ).xDisplayPosition < 197 )
|
||||
{
|
||||
this.repositionSlot( (AppEngSlot) s );
|
||||
}
|
||||
}
|
||||
|
||||
if( s instanceof SlotCraftingMatrix || s instanceof SlotFakeCraftingMatrix )
|
||||
@@ -353,6 +386,7 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
public void onGuiClosed()
|
||||
{
|
||||
super.onGuiClosed();
|
||||
Keyboard.enableRepeatEvents( false );
|
||||
memoryText = this.searchField.getText();
|
||||
}
|
||||
|
||||
@@ -365,10 +399,14 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, x_width, 18 );
|
||||
|
||||
if( this.viewCell || ( this instanceof GuiSecurity ) )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + x_width, offsetY, x_width, 0, 46, 128 );
|
||||
}
|
||||
|
||||
for( int x = 0; x < this.rows; x++ )
|
||||
{
|
||||
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 );
|
||||
|
||||
@@ -386,11 +424,15 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
}
|
||||
|
||||
if( update )
|
||||
{
|
||||
this.repo.setViewCell( this.myCurrentViewCells );
|
||||
}
|
||||
}
|
||||
|
||||
if( this.searchField != null )
|
||||
{
|
||||
this.searchField.drawTextBox();
|
||||
}
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -420,7 +462,9 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
if( !this.checkHotbarKeys( key ) )
|
||||
{
|
||||
if( character == ' ' && this.searchField.getText().length() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.searchField.textboxKeyTyped( character, key ) )
|
||||
{
|
||||
@@ -464,13 +508,19 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
|
||||
public void updateSetting( IConfigManager manager, Enum settingName, Enum newValue )
|
||||
{
|
||||
if( this.SortByBox != null )
|
||||
{
|
||||
this.SortByBox.set( this.configSrc.getSetting( Settings.SORT_BY ) );
|
||||
}
|
||||
|
||||
if( this.SortDirBox != null )
|
||||
{
|
||||
this.SortDirBox.set( this.configSrc.getSetting( Settings.SORT_DIRECTION ) );
|
||||
}
|
||||
|
||||
if( this.ViewBox != null )
|
||||
{
|
||||
this.ViewBox.set( this.configSrc.getSetting( Settings.VIEW_MODE ) );
|
||||
}
|
||||
|
||||
this.repo.updateView();
|
||||
}
|
||||
|
||||
@@ -161,7 +161,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
String str = Long.toString( refStack.getStackSize() );
|
||||
if( refStack.getStackSize() >= 10000 )
|
||||
{
|
||||
str = Long.toString( refStack.getStackSize() / 1000 ) + 'k';
|
||||
}
|
||||
|
||||
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 );
|
||||
@@ -176,7 +178,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
|
||||
toolTip += ( '\n' + GuiText.Installed.getLocal() + ": " + ( refStack.getStackSize() ) );
|
||||
if( refStack.getCountRequestable() > 0 )
|
||||
{
|
||||
toolTip += ( '\n' + GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( refStack.getCountRequestable(), true ) );
|
||||
}
|
||||
|
||||
toolPosX = x * sectionLength + xo + sectionLength - 8;
|
||||
toolPosY = y * 18 + yo;
|
||||
@@ -214,7 +218,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
this.repo.clear();
|
||||
|
||||
for( IAEItemStack is : list )
|
||||
{
|
||||
this.repo.postUpdate( is );
|
||||
}
|
||||
|
||||
this.repo.updateView();
|
||||
this.setScrollBar();
|
||||
@@ -249,7 +255,9 @@ public class GuiNetworkStatus extends AEBaseGui implements ISortSource
|
||||
if( myStack != null )
|
||||
{
|
||||
while( currentToolTip.size() > 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 );
|
||||
|
||||
while( currentToolTip.size() > 1 )
|
||||
{
|
||||
currentToolTip.remove( 1 );
|
||||
}
|
||||
|
||||
currentToolTip.add( GuiText.Installed.getLocal() + ": " + ( myStack.getStackSize() ) );
|
||||
currentToolTip.add( GuiText.EnergyDrain.getLocal() + ": " + Platform.formatPowerLong( myStack.getCountRequestable(), true ) );
|
||||
|
||||
@@ -53,7 +53,9 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
try
|
||||
{
|
||||
if( btn == this.tFacades )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "NetworkTool", "Toggle" ) );
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
{
|
||||
@@ -75,7 +77,9 @@ public class GuiNetworkTool extends AEBaseGui
|
||||
public void drawFG( int offsetX, int offsetY, int mouseX, int mouseY )
|
||||
{
|
||||
if( this.tFacades != null )
|
||||
{
|
||||
this.tFacades.setState( ( (ContainerNetworkTool) this.inventorySlots ).facadeMode );
|
||||
}
|
||||
|
||||
this.fontRendererObj.drawString( this.getGuiDisplayName( GuiText.NetworkTool.getLocal() ), 8, 6, 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()
|
||||
{
|
||||
if( this.container.craftingMode )
|
||||
{
|
||||
return "guis/pattern.png";
|
||||
}
|
||||
return "guis/pattern2.png";
|
||||
}
|
||||
|
||||
@@ -138,8 +140,12 @@ public class GuiPatternTerm extends GuiMEMonitorable
|
||||
protected void repositionSlot( AppEngSlot s )
|
||||
{
|
||||
if( s.isPlayerSide() )
|
||||
{
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
s.yDisplayPosition = s.defY + this.ySize - 78 - 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,9 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if( this.OriginalGui != null && myIcon != null )
|
||||
{
|
||||
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.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;
|
||||
|
||||
if( isPlus || isMinus )
|
||||
{
|
||||
this.addQty( this.getQty( btn ) );
|
||||
}
|
||||
}
|
||||
|
||||
private void addQty( int i )
|
||||
@@ -213,10 +217,14 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if( fixed )
|
||||
{
|
||||
this.priority.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
long result = Long.parseLong( out );
|
||||
result += i;
|
||||
@@ -255,10 +263,14 @@ public class GuiPriority extends AEBaseGui
|
||||
}
|
||||
|
||||
if( fixed )
|
||||
{
|
||||
this.priority.setText( out );
|
||||
}
|
||||
|
||||
if( out.length() == 0 )
|
||||
{
|
||||
out = "0";
|
||||
}
|
||||
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "PriorityHost.Priority", out ) );
|
||||
}
|
||||
|
||||
@@ -62,15 +62,25 @@ public class GuiSecurity extends GuiMEMonitorable
|
||||
SecurityPermissions toggleSetting = null;
|
||||
|
||||
if( btn == this.inject )
|
||||
{
|
||||
toggleSetting = SecurityPermissions.INJECT;
|
||||
}
|
||||
if( btn == this.extract )
|
||||
{
|
||||
toggleSetting = SecurityPermissions.EXTRACT;
|
||||
}
|
||||
if( btn == this.craft )
|
||||
{
|
||||
toggleSetting = SecurityPermissions.CRAFT;
|
||||
}
|
||||
if( btn == this.build )
|
||||
{
|
||||
toggleSetting = SecurityPermissions.BUILD;
|
||||
}
|
||||
if( btn == this.security )
|
||||
{
|
||||
toggleSetting = SecurityPermissions.SECURITY;
|
||||
}
|
||||
|
||||
if( toggleSetting != null )
|
||||
{
|
||||
|
||||
@@ -84,13 +84,19 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
}
|
||||
|
||||
if( this.storageFilter != null )
|
||||
{
|
||||
this.storageFilter.set( ( (ContainerStorageBus) this.cvb ).storageFilter );
|
||||
}
|
||||
|
||||
if( this.rwMode != null )
|
||||
{
|
||||
this.rwMode.set( ( (ContainerStorageBus) this.cvb ).rwMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,19 +115,25 @@ public class GuiStorageBus extends GuiUpgradeable
|
||||
try
|
||||
{
|
||||
if( btn == this.partition )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Partition" ) );
|
||||
|
||||
}
|
||||
else if( btn == this.clear )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketValueConfig( "StorageBus.Action", "Clear" ) );
|
||||
|
||||
}
|
||||
else if( btn == this.priority )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketSwitchGuis( GuiBridge.GUI_PRIORITY ) );
|
||||
|
||||
}
|
||||
else if( btn == this.rwMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.rwMode.getSetting(), backwards ) );
|
||||
|
||||
}
|
||||
else if( btn == this.storageFilter )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.storageFilter.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
catch( IOException e )
|
||||
{
|
||||
|
||||
@@ -94,13 +94,19 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
this.fontRendererObj.drawString( GuiText.inventory.getLocal(), 8, this.ySize - 96 + 3, 4210752 );
|
||||
|
||||
if( this.redstoneMode != null )
|
||||
{
|
||||
this.redstoneMode.set( this.cvb.rsMode );
|
||||
}
|
||||
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
this.fuzzyMode.set( this.cvb.fzMode );
|
||||
}
|
||||
|
||||
if( this.craftMode != null )
|
||||
{
|
||||
this.craftMode.set( this.cvb.cMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -111,19 +117,29 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
this.bindTexture( this.getBackground() );
|
||||
this.drawTexturedModalRect( offsetX, offsetY, 0, 0, 211 - 34, this.ySize );
|
||||
if( this.drawUpgrades() )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 177, offsetY, 177, 0, 35, 14 + this.cvb.availableUpgrades() * 18 );
|
||||
}
|
||||
if( this.hasToolbox() )
|
||||
{
|
||||
this.drawTexturedModalRect( offsetX + 178, offsetY + this.ySize - 90, 178, this.ySize - 90, 68, 68 );
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleButtonVisibility()
|
||||
{
|
||||
if( this.redstoneMode != null )
|
||||
{
|
||||
this.redstoneMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.REDSTONE ) > 0 );
|
||||
}
|
||||
if( this.fuzzyMode != null )
|
||||
{
|
||||
this.fuzzyMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.FUZZY ) > 0 );
|
||||
}
|
||||
if( this.craftMode != null )
|
||||
{
|
||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
}
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -149,12 +165,18 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
boolean backwards = Mouse.isButtonDown( 1 );
|
||||
|
||||
if( btn == this.redstoneMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.redstoneMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.craftMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.craftMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.fuzzyMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,9 +193,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
GL11.glScalef( 0.5f, 0.5f, 0.5f );
|
||||
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -212,9 +216,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
else
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -236,7 +244,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
{
|
||||
ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
if( app == null )
|
||||
{
|
||||
return 256 - 1;
|
||||
}
|
||||
return app.index;
|
||||
}
|
||||
return 256 - 1;
|
||||
@@ -262,7 +272,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
{
|
||||
ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
|
||||
if( buttonAppearance == null )
|
||||
{
|
||||
return "No Such Message";
|
||||
}
|
||||
|
||||
displayName = buttonAppearance.displayName;
|
||||
displayValue = buttonAppearance.displayValue;
|
||||
@@ -274,19 +286,27 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
String value = StatCollector.translateToLocal( displayValue );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
name = displayName;
|
||||
}
|
||||
if( value == null || value.isEmpty() )
|
||||
{
|
||||
value = displayValue;
|
||||
}
|
||||
|
||||
if( this.fillVar != null )
|
||||
{
|
||||
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
|
||||
}
|
||||
|
||||
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||
StringBuilder sb = new StringBuilder( value );
|
||||
|
||||
int i = sb.lastIndexOf( "\n" );
|
||||
if( i <= 0 )
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
|
||||
{
|
||||
sb.replace( i, i + 1, "\n" );
|
||||
@@ -357,9 +377,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
public boolean equals( Object obj )
|
||||
{
|
||||
if( obj == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( this.getClass() != obj.getClass() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
EnumPair other = (EnumPair) obj;
|
||||
return other.setting == this.setting && other.value == this.value;
|
||||
}
|
||||
|
||||
@@ -43,11 +43,17 @@ public class GuiNumberBox extends GuiTextField
|
||||
try
|
||||
{
|
||||
if( this.type == int.class || this.type == Integer.class )
|
||||
{
|
||||
Integer.parseInt( this.getText() );
|
||||
}
|
||||
else if( this.type == long.class || this.type == Long.class )
|
||||
{
|
||||
Long.parseLong( this.getText() );
|
||||
}
|
||||
else if( this.type == double.class || this.type == Double.class )
|
||||
{
|
||||
Double.parseDouble( this.getText() );
|
||||
}
|
||||
}
|
||||
catch( NumberFormatException e )
|
||||
{
|
||||
|
||||
@@ -91,7 +91,9 @@ public class GuiProgressBar extends GuiButton implements ITooltip
|
||||
public String getMessage()
|
||||
{
|
||||
if( this.fullMsg != null )
|
||||
{
|
||||
return this.fullMsg;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
if( this.minScroll > this.maxScroll )
|
||||
{
|
||||
this.maxScroll = this.minScroll;
|
||||
}
|
||||
|
||||
this.applyRange();
|
||||
}
|
||||
@@ -128,7 +130,9 @@ public class GuiScrollbar implements IScrollSource
|
||||
public void click( AEBaseGui aeBaseGui, int x, int y )
|
||||
{
|
||||
if( this.getRange() == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( x > this.displayX && x <= this.displayX + this.width )
|
||||
{
|
||||
|
||||
@@ -93,16 +93,22 @@ public class GuiToggleButton extends GuiButton implements ITooltip
|
||||
String value = StatCollector.translateToLocal( this.displayHint );
|
||||
|
||||
if( name == null || name.isEmpty() )
|
||||
{
|
||||
name = this.displayName;
|
||||
}
|
||||
if( value == null || value.isEmpty() )
|
||||
{
|
||||
value = this.displayHint;
|
||||
}
|
||||
|
||||
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
|
||||
StringBuilder sb = new StringBuilder( value );
|
||||
|
||||
int i = sb.lastIndexOf( "\n" );
|
||||
if( i <= 0 )
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
|
||||
{
|
||||
sb.replace( i, i + 1, "\n" );
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
package appeng.client.me;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
@@ -45,12 +47,14 @@ public class ClientDCInternalInv implements Comparable<ClientDCInternalInv>
|
||||
{
|
||||
String s = StatCollector.translateToLocal( this.unlocalizedName + ".name" );
|
||||
if( s.equals( this.unlocalizedName + ".name" ) )
|
||||
{
|
||||
return StatCollector.translateToLocal( this.unlocalizedName );
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo( ClientDCInternalInv o )
|
||||
public int compareTo( @Nonnull ClientDCInternalInv o )
|
||||
{
|
||||
return ItemSorters.compareLong( this.sortBy, o.sortBy );
|
||||
}
|
||||
|
||||
@@ -74,7 +74,9 @@ public class ItemRepo
|
||||
idx += this.src.getCurrentScroll() * this.rowSize;
|
||||
|
||||
if( idx >= this.view.size() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.view.get( idx );
|
||||
}
|
||||
|
||||
@@ -83,7 +85,9 @@ public class ItemRepo
|
||||
idx += this.src.getCurrentScroll() * this.rowSize;
|
||||
|
||||
if( idx >= this.dsp.size() )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return this.dsp.get( idx );
|
||||
}
|
||||
|
||||
@@ -102,7 +106,9 @@ public class ItemRepo
|
||||
st.add( is );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.list.add( is );
|
||||
}
|
||||
}
|
||||
|
||||
public void setViewCell( ItemStack[] list )
|
||||
@@ -122,7 +128,9 @@ public class ItemRepo
|
||||
Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
{
|
||||
this.updateNEI( this.searchString );
|
||||
}
|
||||
|
||||
this.innerSearch = this.searchString;
|
||||
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
@@ -158,11 +166,15 @@ public class ItemRepo
|
||||
if( this.myPartitionList != null )
|
||||
{
|
||||
if( !this.myPartitionList.isListed( is ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if( viewMode == ViewItems.CRAFTABLE && !is.isCraftable() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( viewMode == ViewItems.CRAFTABLE )
|
||||
{
|
||||
@@ -171,7 +183,9 @@ public class ItemRepo
|
||||
}
|
||||
|
||||
if( viewMode == ViewItems.STORED && is.getStackSize() == 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
notDone = true;
|
||||
@@ -185,12 +199,14 @@ public class ItemRepo
|
||||
if( terminalSearchToolTips && notDone )
|
||||
{
|
||||
for( Object lp : Platform.getTooltip( is ) )
|
||||
{
|
||||
if( lp instanceof String && m.matcher( (String) lp ).find() )
|
||||
{
|
||||
this.view.add( is );
|
||||
notDone = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -206,16 +222,26 @@ public class ItemRepo
|
||||
ItemSorters.init();
|
||||
|
||||
if( SortBy == SortOrder.MOD )
|
||||
{
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_MOD );
|
||||
}
|
||||
else if( SortBy == SortOrder.AMOUNT )
|
||||
{
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_SIZE );
|
||||
}
|
||||
else if( SortBy == SortOrder.INVTWEAKS )
|
||||
{
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_INV_TWEAKS );
|
||||
}
|
||||
else
|
||||
{
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME );
|
||||
}
|
||||
|
||||
for( IAEItemStack is : this.view )
|
||||
{
|
||||
this.dsp.add( is.getItemStack() );
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNEI( String filter )
|
||||
|
||||
@@ -68,7 +68,9 @@ public class SlotDisconnected extends AppEngSlot
|
||||
ItemEncodedPattern iep = (ItemEncodedPattern) is.getItem();
|
||||
ItemStack out = iep.getOutput( is );
|
||||
if( out != null )
|
||||
{
|
||||
return out;
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.getStack();
|
||||
|
||||
@@ -41,7 +41,9 @@ public class SlotME extends Slot
|
||||
public IAEItemStack getAEStack()
|
||||
{
|
||||
if( this.mySlot.hasPower() )
|
||||
{
|
||||
return this.mySlot.getAEStack();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -60,7 +62,9 @@ public class SlotME extends Slot
|
||||
public ItemStack getStack()
|
||||
{
|
||||
if( this.mySlot.hasPower() )
|
||||
{
|
||||
return this.mySlot.getStack();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -68,7 +72,9 @@ public class SlotME extends Slot
|
||||
public boolean getHasStack()
|
||||
{
|
||||
if( this.mySlot.hasPower() )
|
||||
{
|
||||
return this.getStack() != null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -289,7 +289,9 @@ public class BaseBlockRender
|
||||
if( info.isValid() )
|
||||
{
|
||||
if( block.hasSubtypes() )
|
||||
{
|
||||
block.setRenderStateByMeta( item.getItemDamage() );
|
||||
}
|
||||
|
||||
renderer.uvRotateBottom = info.getTexture( ForgeDirection.DOWN ).setFlip( getOrientation( ForgeDirection.DOWN, ForgeDirection.SOUTH, ForgeDirection.UP ) );
|
||||
renderer.uvRotateTop = info.getTexture( ForgeDirection.UP ).setFlip( getOrientation( ForgeDirection.UP, ForgeDirection.SOUTH, ForgeDirection.UP ) );
|
||||
@@ -304,7 +306,9 @@ public class BaseBlockRender
|
||||
this.renderInvBlock( EnumSet.allOf( ForgeDirection.class ), block, item, tess, 0xffffff, renderer );
|
||||
|
||||
if( block.hasSubtypes() )
|
||||
{
|
||||
info.setTemporaryRenderIcon( null );
|
||||
}
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
}
|
||||
@@ -314,7 +318,9 @@ public class BaseBlockRender
|
||||
if( in == null || in == ForgeDirection.UNKNOWN // 1
|
||||
|| forward == null || forward == ForgeDirection.UNKNOWN // 2
|
||||
|| up == null || up == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int a = in.ordinal();
|
||||
int b = forward.ordinal();
|
||||
@@ -327,7 +333,9 @@ public class BaseBlockRender
|
||||
{
|
||||
int meta = 0;
|
||||
if( block != null && block.hasSubtypes() && item != null )
|
||||
{
|
||||
meta = item.getItemDamage();
|
||||
}
|
||||
|
||||
if( sides.contains( ForgeDirection.DOWN ) )
|
||||
{
|
||||
@@ -387,8 +395,12 @@ public class BaseBlockRender
|
||||
public IIcon firstNotNull( IIcon... s )
|
||||
{
|
||||
for( IIcon o : s )
|
||||
{
|
||||
if( o != null )
|
||||
{
|
||||
return o;
|
||||
}
|
||||
}
|
||||
return ExtraBlockTextures.getMissing();
|
||||
}
|
||||
|
||||
@@ -434,9 +446,13 @@ public class BaseBlockRender
|
||||
public IOrientable getOrientable( AEBaseBlock block, IBlockAccess w, int x, int y, int z )
|
||||
{
|
||||
if( block.hasBlockTileEntity() )
|
||||
{
|
||||
return (AEBaseTile) block.getTileEntity( w, x, y, z );
|
||||
}
|
||||
else if( block instanceof IOrientableBlock )
|
||||
{
|
||||
return ( (IOrientableBlock) block ).getOrientable( w, x, y, z );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -660,10 +676,14 @@ public class BaseBlockRender
|
||||
private double mapFaceUV( int offset, int uv )
|
||||
{
|
||||
if( offset == 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if( offset > 0 )
|
||||
{
|
||||
return uv / 16.0;
|
||||
}
|
||||
|
||||
return ( 16.0 - uv ) / 16.0;
|
||||
}
|
||||
@@ -681,9 +701,13 @@ public class BaseBlockRender
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
{
|
||||
GL11.glShadeModel( GL11.GL_SMOOTH );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glShadeModel( GL11.GL_FLAT );
|
||||
}
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
@@ -706,10 +730,14 @@ public class BaseBlockRender
|
||||
if( forward != null && up != null )
|
||||
{
|
||||
if( forward == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
forward = ForgeDirection.SOUTH;
|
||||
}
|
||||
|
||||
if( up == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
up = ForgeDirection.UP;
|
||||
}
|
||||
|
||||
ForgeDirection west = Platform.crossProduct( forward, up );
|
||||
|
||||
|
||||
@@ -62,7 +62,9 @@ public class BlockRenderInfo
|
||||
public void setTemporaryRenderIcon( IIcon IIcon )
|
||||
{
|
||||
if( IIcon == null )
|
||||
{
|
||||
this.useTmp = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.useTmp = true;
|
||||
|
||||
@@ -151,7 +151,9 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
public void setBounds( double[] bounds )
|
||||
{
|
||||
if( bounds == null || bounds.length != 6 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.minX = bounds[0];
|
||||
this.minY = bounds[1];
|
||||
@@ -301,18 +303,30 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
p.getBoxes( this.bbc );
|
||||
|
||||
if( this.bbc.minX < 1 )
|
||||
{
|
||||
this.bbc.minX = 1;
|
||||
}
|
||||
if( this.bbc.minY < 1 )
|
||||
{
|
||||
this.bbc.minY = 1;
|
||||
}
|
||||
if( this.bbc.minZ < 1 )
|
||||
{
|
||||
this.bbc.minZ = 1;
|
||||
}
|
||||
|
||||
if( this.bbc.maxX > 15 )
|
||||
{
|
||||
this.bbc.maxX = 15;
|
||||
}
|
||||
if( this.bbc.maxY > 15 )
|
||||
{
|
||||
this.bbc.maxY = 15;
|
||||
}
|
||||
if( this.bbc.maxZ > 15 )
|
||||
{
|
||||
this.bbc.maxZ = 15;
|
||||
}
|
||||
}
|
||||
|
||||
this.setBounds( this.bbc.minX, this.bbc.minY, this.bbc.minZ, this.bbc.maxX, this.bbc.maxY, this.bbc.maxZ );
|
||||
@@ -384,30 +398,48 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
ForgeDirection west = ForgeDirection.UNKNOWN;
|
||||
|
||||
if( forward == null || up == null )
|
||||
{
|
||||
return dir;
|
||||
}
|
||||
|
||||
int west_x = forward.offsetY * up.offsetZ - forward.offsetZ * up.offsetY;
|
||||
int west_y = forward.offsetZ * up.offsetX - forward.offsetX * up.offsetZ;
|
||||
int west_z = forward.offsetX * up.offsetY - forward.offsetY * up.offsetX;
|
||||
|
||||
for( ForgeDirection dx : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( dx.offsetX == west_x && dx.offsetY == west_y && dx.offsetZ == west_z )
|
||||
{
|
||||
west = dx;
|
||||
}
|
||||
}
|
||||
|
||||
if( dir == forward )
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
if( dir == forward.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.NORTH;
|
||||
}
|
||||
|
||||
if( dir == up )
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
}
|
||||
if( dir == up.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.DOWN;
|
||||
}
|
||||
|
||||
if( dir == west )
|
||||
{
|
||||
return ForgeDirection.WEST;
|
||||
}
|
||||
if( dir == west.getOpposite() )
|
||||
{
|
||||
return ForgeDirection.EAST;
|
||||
}
|
||||
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
@@ -439,7 +471,9 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
public void renderBlock( int x, int y, int z, RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for( Block multiPart : AEApi.instance().definitions().blocks().multiPart().maybeBlock().asSet() )
|
||||
{
|
||||
@@ -490,7 +524,9 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
public void renderBlockCurrentBounds( int x, int y, int z, RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for( Block block : this.maybeBlock.asSet() )
|
||||
{
|
||||
@@ -502,7 +538,9 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
public void renderFaceCutout( int x, int y, int z, IIcon ico, ForgeDirection face, float edgeThickness, RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch( face )
|
||||
{
|
||||
@@ -540,7 +578,9 @@ public final class BusRenderHelper implements IPartRenderHelper
|
||||
public void renderFace( int x, int y, int z, IIcon ico, ForgeDirection face, RenderBlocks renderer )
|
||||
{
|
||||
if( !this.renderThis() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.prepareBounds( renderer );
|
||||
switch( face )
|
||||
|
||||
@@ -68,7 +68,9 @@ public class BusRenderer implements IItemRenderer
|
||||
public void renderItem( ItemRenderType type, ItemStack item, Object... data )
|
||||
{
|
||||
if( item == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
@@ -103,7 +105,9 @@ public class BusRenderer implements IItemRenderer
|
||||
}
|
||||
|
||||
if( type == ItemRenderType.INVENTORY )
|
||||
{
|
||||
GL11.glTranslatef( 0.0f, -0.1f, 0.0f );
|
||||
}
|
||||
|
||||
GL11.glTranslated( 0.2, 0.3, 0.1 );
|
||||
GL11.glScaled( 1.2, 1.2, 1. );
|
||||
@@ -135,7 +139,9 @@ public class BusRenderer implements IItemRenderer
|
||||
}
|
||||
|
||||
if( fp != null )
|
||||
{
|
||||
fp.renderInventory( BusRenderHelper.INSTANCE, this.renderer );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -167,7 +173,9 @@ public class BusRenderer implements IItemRenderer
|
||||
{
|
||||
part = c.createPartFromItemStack( is );
|
||||
if( part != null )
|
||||
{
|
||||
RENDER_PART.put( id, part );
|
||||
}
|
||||
}
|
||||
|
||||
return part;
|
||||
|
||||
@@ -51,10 +51,14 @@ public class CableRenderHelper
|
||||
RenderBlocksWorkaround renderer = BusRenderer.INSTANCE.renderer;
|
||||
|
||||
if( renderer.overrideBlockTexture != null )
|
||||
{
|
||||
BusRenderHelper.INSTANCE.setPass( 0 );
|
||||
}
|
||||
|
||||
if( renderer.blockAccess == null )
|
||||
{
|
||||
renderer.blockAccess = Minecraft.getMinecraft().theWorld;
|
||||
}
|
||||
|
||||
for( ForgeDirection s : ForgeDirection.values() )
|
||||
{
|
||||
@@ -108,7 +112,9 @@ public class CableRenderHelper
|
||||
o += bb.minZ < min ? 1 : 0;
|
||||
|
||||
if( o >= 2 )
|
||||
{
|
||||
useThinFacades = true;
|
||||
}
|
||||
}
|
||||
|
||||
for( ForgeDirection s : ForgeDirection.VALID_DIRECTIONS )
|
||||
@@ -124,7 +130,9 @@ public class CableRenderHelper
|
||||
if( bb.intersectsWith( pb ) )
|
||||
{
|
||||
if( b == null )
|
||||
{
|
||||
b = bb;
|
||||
}
|
||||
else
|
||||
{
|
||||
b.maxX = Math.max( b.maxX, bb.maxX );
|
||||
|
||||
@@ -54,9 +54,13 @@ public class ItemRenderer implements IItemRenderer
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
if( type == ItemRenderType.ENTITY )
|
||||
{
|
||||
GL11.glTranslatef( -0.5f, -0.5f, -0.5f );
|
||||
}
|
||||
if( type == ItemRenderType.INVENTORY )
|
||||
{
|
||||
GL11.glTranslatef( 0.0f, -0.1f, 0.0f );
|
||||
}
|
||||
|
||||
WorldRender.INSTANCE.renderItemBlock( item, type, data );
|
||||
|
||||
|
||||
@@ -220,7 +220,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.DOWN ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.DOWN ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -257,7 +259,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceYNeg( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -274,7 +278,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.UP ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.UP ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -311,7 +317,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceYPos( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -328,7 +336,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.NORTH ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.NORTH ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -365,7 +375,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceZNeg( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -382,7 +394,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.SOUTH ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.SOUTH ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -419,7 +433,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceZPos( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -436,7 +452,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.WEST ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.WEST ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -473,7 +491,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceXNeg( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -490,7 +510,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
if( this.faces.contains( ForgeDirection.EAST ) )
|
||||
{
|
||||
if( !this.renderFaces.contains( ForgeDirection.EAST ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( this.isFacade )
|
||||
{
|
||||
@@ -527,7 +549,9 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
super.renderFaceXPos( par1Block, par2, par4, par6, par8Icon );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -577,13 +601,17 @@ public class RenderBlocksWorkaround extends RenderBlocks
|
||||
int o = 0;
|
||||
|
||||
for( int i = -1; i <= 1; i++ )
|
||||
{
|
||||
for( int j = -1; j <= 1; j++ )
|
||||
{
|
||||
for( int k = -1; k <= 1; k++ )
|
||||
{
|
||||
|
||||
this.lightHashTmp[o] = blk.getMixedBrightnessForBlock( this.blockAccess, x + i, y + j, z + k );
|
||||
o++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return Arrays.hashCode( this.lightHashTmp );
|
||||
}
|
||||
|
||||
@@ -60,7 +60,9 @@ public class TESRWrapper extends TileEntitySpecialRenderer
|
||||
if( b instanceof AEBaseBlock && ( (AEBaseTile) te ).requiresTESR() )
|
||||
{
|
||||
if( Math.abs( x ) > this.MAX_DISTANCE || Math.abs( y ) > this.MAX_DISTANCE || Math.abs( z ) > this.MAX_DISTANCE )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Tessellator tess = Tessellator.instance;
|
||||
|
||||
|
||||
@@ -266,7 +266,9 @@ public class RenderBlockAssembler extends BaseBlockRender implements IBoxProvide
|
||||
if( pc.isConnected( side.getOpposite() ) )
|
||||
{
|
||||
if( covered )
|
||||
{
|
||||
return pc.getCoveredTexture( pc.getCableColor() );
|
||||
}
|
||||
return pc.getGlassTexture( pc.getCableColor() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +130,9 @@ public class RenderBlockCharger extends BaseBlockRender
|
||||
{
|
||||
ItemStack sis = null;
|
||||
if( tile instanceof IInventory )
|
||||
{
|
||||
sis = ( (IInventory) tile ).getStackInSlot( 0 );
|
||||
}
|
||||
|
||||
if( sis != null )
|
||||
{
|
||||
|
||||
@@ -58,12 +58,18 @@ public class RenderBlockController extends BaseBlockRender
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if( isConflict )
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
}
|
||||
else
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumn.getIcon() );
|
||||
}
|
||||
|
||||
renderer.uvRotateEast = 1;
|
||||
renderer.uvRotateWest = 1;
|
||||
@@ -76,12 +82,18 @@ public class RenderBlockController extends BaseBlockRender
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if( isConflict )
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
}
|
||||
else
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumn.getIcon() );
|
||||
}
|
||||
|
||||
renderer.uvRotateEast = 0;
|
||||
renderer.uvRotateNorth = 0;
|
||||
@@ -92,12 +104,18 @@ public class RenderBlockController extends BaseBlockRender
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumnPowered.getIcon() );
|
||||
if( isConflict )
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnConflict;
|
||||
}
|
||||
else
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerColumnLights;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerColumn.getIcon() );
|
||||
}
|
||||
|
||||
renderer.uvRotateNorth = 1;
|
||||
renderer.uvRotateSouth = 1;
|
||||
@@ -109,9 +127,13 @@ public class RenderBlockController extends BaseBlockRender
|
||||
renderer.uvRotateEast = renderer.uvRotateBottom = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
if( v == 0 )
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerInsideA.getIcon() );
|
||||
}
|
||||
else
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerInsideB.getIcon() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -119,12 +141,18 @@ public class RenderBlockController extends BaseBlockRender
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( ExtraBlockTextures.BlockControllerPowered.getIcon() );
|
||||
if( isConflict )
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerConflict;
|
||||
}
|
||||
else
|
||||
{
|
||||
lights = ExtraBlockTextures.BlockControllerLights;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blk.getRendererInstance().setTemporaryRenderIcon( null );
|
||||
}
|
||||
}
|
||||
|
||||
boolean out = renderer.renderStandardBlock( blk, x, y, z );
|
||||
@@ -148,7 +176,9 @@ public class RenderBlockController extends BaseBlockRender
|
||||
private TileEntity getTileEntity( IBlockAccess world, int x, int y, int z )
|
||||
{
|
||||
if( y >= 0 )
|
||||
{
|
||||
return world.getTileEntity( x, y, z );
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
|
||||
boolean LocalEmit = emitsLight;
|
||||
if( blk instanceof BlockCraftingMonitor && ct.getForward() != side )
|
||||
{
|
||||
LocalEmit = false;
|
||||
}
|
||||
|
||||
this.handleSide( blk, meta, x, y, z, i, renderer, ct.getForward() == side ? theIcon : nonForward, LocalEmit, isMonitor, side, w );
|
||||
}
|
||||
@@ -165,11 +167,17 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
private void renderCorner( BusRenderHelper i, RenderBlocks renderer, IBlockAccess w, int x, int y, int z, ForgeDirection up, ForgeDirection east, ForgeDirection south )
|
||||
{
|
||||
if( this.isConnected( w, x, y, z, up ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( this.isConnected( w, x, y, z, east ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( this.isConnected( w, x, y, z, south ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
i.setBounds( this.gso( east, 3, ForgeDirection.WEST ), this.gso( up, 3, ForgeDirection.DOWN ), this.gso( south, 3, ForgeDirection.NORTH ), this.gso( east, 13, ForgeDirection.EAST ), this.gso( up, 13, ForgeDirection.UP ), this.gso( south, 13, ForgeDirection.SOUTH ) );
|
||||
i.prepareBounds( renderer );
|
||||
@@ -182,7 +190,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
if( side == target )
|
||||
{
|
||||
if( side.offsetX > 0 || side.offsetY > 0 || side.offsetZ > 0 )
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return def;
|
||||
@@ -191,7 +201,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
private void handleSide( AEBaseBlock blk, int meta, int x, int y, int z, BusRenderHelper i, RenderBlocks renderer, IIcon color, boolean emitsLight, boolean isMonitor, ForgeDirection side, IBlockAccess w )
|
||||
{
|
||||
if( this.isConnected( w, x, y, z, side ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
i.setFacesToRender( EnumSet.of( side ) );
|
||||
|
||||
@@ -203,9 +215,13 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
else
|
||||
{
|
||||
if( color == ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon() )
|
||||
{
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingMonitorOuter.getIcon() );
|
||||
}
|
||||
else
|
||||
{
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingFitSolid.getIcon() );
|
||||
}
|
||||
|
||||
i.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
|
||||
@@ -233,7 +249,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
i.renderFace( x, y, z, ExtraBlockTextures.BlockCraftingMonitorFit_Dark.getIcon(), side, renderer );
|
||||
}
|
||||
else
|
||||
{
|
||||
i.renderBlockCurrentBounds( x, y, z, renderer );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,14 +285,22 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
for( ForgeDirection a : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( a == side || a == side.getOpposite() )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( ( side.offsetX != 0 || side.offsetZ != 0 ) && ( a == ForgeDirection.NORTH || a == ForgeDirection.EAST || a == ForgeDirection.WEST || a == ForgeDirection.SOUTH ) )
|
||||
{
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRingLongRotated.getIcon() );
|
||||
}
|
||||
else if( ( side.offsetY != 0 ) && ( a == ForgeDirection.EAST || a == ForgeDirection.WEST ) )
|
||||
{
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRingLongRotated.getIcon() );
|
||||
}
|
||||
else
|
||||
{
|
||||
i.setTexture( ExtraBlockTextures.BlockCraftingUnitRingLong.getIcon() );
|
||||
}
|
||||
|
||||
double width = 3.0 / 16.0;
|
||||
|
||||
@@ -334,7 +360,9 @@ public class RenderBlockCraftingCPU extends BaseBlockRender
|
||||
if( side != target )
|
||||
{
|
||||
if( side.offsetX > 0 || side.offsetY > 0 || side.offsetZ > 0 )
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return def;
|
||||
|
||||
@@ -84,7 +84,9 @@ public class RenderBlockCraftingCPUMonitor extends RenderBlockCraftingCPU
|
||||
GL11.glEndList();
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glCallList( cmt.dspList );
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -70,15 +70,21 @@ public class RenderBlockCrank extends BaseBlockRender
|
||||
{
|
||||
TileCrank tc = (TileCrank) tile;
|
||||
if( tc.getUp() == null || tc.getUp() == ForgeDirection.UNKNOWN )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( TextureMap.locationBlocksTexture );
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
if( Minecraft.isAmbientOcclusionEnabled() )
|
||||
{
|
||||
GL11.glShadeModel( GL11.GL_SMOOTH );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glShadeModel( GL11.GL_FLAT );
|
||||
}
|
||||
|
||||
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
|
||||
@@ -47,9 +47,13 @@ public class RenderBlockEnergyCube extends BaseBlockRender
|
||||
int meta = (int) ( 8.0 * ( internalCurrentPower / internalMaxPower ) );
|
||||
|
||||
if( meta > 7 )
|
||||
{
|
||||
meta = 7;
|
||||
}
|
||||
if( meta < 0 )
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
renderer.setOverrideBlockTexture( blk.getIcon( 0, meta ) );
|
||||
super.renderInventory( blk, is, renderer, type, obj );
|
||||
|
||||
@@ -112,7 +112,9 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
|
||||
IOrientable te = this.getOrientable( block, world, x, y, z );
|
||||
if( te == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ForgeDirection fdy = te.getUp();
|
||||
ForgeDirection fdz = te.getForward();
|
||||
@@ -178,14 +180,18 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
long currentTime = System.currentTimeMillis();
|
||||
absoluteProgress = currentTime - inv.clientStart;
|
||||
if( absoluteProgress > 800 )
|
||||
{
|
||||
inv.smash = false;
|
||||
}
|
||||
}
|
||||
|
||||
float relativeProgress = absoluteProgress % 800 / 400.0f;
|
||||
float progress = relativeProgress;
|
||||
|
||||
if( progress > 1.0f )
|
||||
{
|
||||
progress = 1.0f - ( progress - 1.0f );
|
||||
}
|
||||
press -= progress / 5.0f;
|
||||
|
||||
IIcon ic = ExtraBlockTextures.BlockInscriberInside.getIcon();
|
||||
@@ -219,11 +225,17 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
|
||||
int items = 0;
|
||||
if( inv.getStackInSlot( 0 ) != null )
|
||||
{
|
||||
items++;
|
||||
}
|
||||
if( inv.getStackInSlot( 1 ) != null )
|
||||
{
|
||||
items++;
|
||||
}
|
||||
if( inv.getStackInSlot( 2 ) != null )
|
||||
{
|
||||
items++;
|
||||
}
|
||||
|
||||
if( relativeProgress > 1.0f || items == 0 )
|
||||
{
|
||||
@@ -233,7 +245,9 @@ public class RenderBlockInscriber extends BaseBlockRender
|
||||
{
|
||||
IInscriberRecipe ir = inv.getTask();
|
||||
if( ir != null )
|
||||
{
|
||||
is = ir.getOutput().copy();
|
||||
}
|
||||
}
|
||||
|
||||
this.renderItem( is, 0.0f, block, tile, tess, x, y, z, f, renderer );
|
||||
|
||||
@@ -73,13 +73,17 @@ public class RenderBlockPaint extends BaseBlockRender
|
||||
for( ForgeDirection side : ForgeDirection.VALID_DIRECTIONS )
|
||||
{
|
||||
if( tp.isSideValid( side ) )
|
||||
{
|
||||
validSides.add( side );
|
||||
}
|
||||
}
|
||||
|
||||
for( Splotch s : tp.getDots() )
|
||||
{
|
||||
if( !validSides.contains( s.side ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( s.lumen )
|
||||
{
|
||||
|
||||
@@ -54,9 +54,13 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
|
||||
ResourceLocation loc;
|
||||
if( is.getItemDamage() == 1 )
|
||||
{
|
||||
loc = new ResourceLocation( "appliedenergistics2", "textures/models/skyblockchest.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
loc = new ResourceLocation( "appliedenergistics2", "textures/models/skychest.png" );
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||
|
||||
@@ -83,12 +87,16 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
public void renderTile( AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
|
||||
{
|
||||
if( !( tile instanceof TileSkyChest ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileSkyChest skyChest = (TileSkyChest) tile;
|
||||
|
||||
if( !skyChest.hasWorldObj() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */ );
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
@@ -96,9 +104,13 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
ResourceLocation loc;
|
||||
|
||||
if( tile.getWorldObj().getBlockMetadata( tile.xCoord, tile.yCoord, tile.zCoord ) == 1 )
|
||||
{
|
||||
loc = new ResourceLocation( "appliedenergistics2", "textures/models/skyblockchest.png" );
|
||||
}
|
||||
else
|
||||
{
|
||||
loc = new ResourceLocation( "appliedenergistics2", "textures/models/skychest.png" );
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture( loc );
|
||||
|
||||
@@ -111,15 +123,23 @@ public class RenderBlockSkyChest extends BaseBlockRender
|
||||
long distance = now - skyChest.lastEvent;
|
||||
|
||||
if( skyChest.playerOpen > 0 )
|
||||
{
|
||||
skyChest.lidAngle += distance * 0.0001;
|
||||
}
|
||||
else
|
||||
{
|
||||
skyChest.lidAngle -= distance * 0.0001;
|
||||
}
|
||||
|
||||
if( skyChest.lidAngle > 0.5f )
|
||||
{
|
||||
skyChest.lidAngle = 0.5f;
|
||||
}
|
||||
|
||||
if( skyChest.lidAngle < 0.0f )
|
||||
{
|
||||
skyChest.lidAngle = 0.0f;
|
||||
}
|
||||
|
||||
float lidAngle = skyChest.lidAngle;
|
||||
lidAngle = 1.0F - lidAngle;
|
||||
|
||||
@@ -61,11 +61,17 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
|
||||
IInventory inv = Minecraft.getMinecraft().thePlayer.inventory;
|
||||
for( int x = 0; x < inv.getSizeInventory(); x++ )
|
||||
{
|
||||
if( inv.getStackInSlot( x ) == is )
|
||||
{
|
||||
isGood = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( !isGood )
|
||||
{
|
||||
type = ItemRenderType.FIRST_PERSON_MAP;
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */ );
|
||||
@@ -85,15 +91,21 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
else
|
||||
{
|
||||
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
||||
{
|
||||
GL11.glRotatef( 15.3f, 0.0f, 0.0f, 1.0f );
|
||||
}
|
||||
|
||||
GL11.glScalef( 1.0F, -1F, -1F );
|
||||
GL11.glScalef( 2.5f, 2.5f, 2.5f );
|
||||
|
||||
if( type == ItemRenderType.EQUIPPED_FIRST_PERSON )
|
||||
{
|
||||
GL11.glTranslatef( 0.3F, -1.65F, -0.19F );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef( 0.2F, -1.65F, -0.19F );
|
||||
}
|
||||
}
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
@@ -114,8 +126,12 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
CompassResult cr = CompassManager.INSTANCE.getCompassDirection( 0, x, y, z );
|
||||
|
||||
for( int i = 0; i < 3; i++ )
|
||||
{
|
||||
for( int j = 0; j < 3; j++ )
|
||||
{
|
||||
CompassManager.INSTANCE.getCompassDirection( 0, x + i - 1, y, z + j - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if( cr.hasResult )
|
||||
{
|
||||
@@ -166,12 +182,16 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
public void renderTile( AEBaseBlock block, AEBaseTile tile, Tessellator tess, double x, double y, double z, float partialTick, RenderBlocks renderer )
|
||||
{
|
||||
if( !( tile instanceof TileSkyCompass ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TileSkyCompass skyCompass = (TileSkyCompass) tile;
|
||||
|
||||
if( !skyCompass.hasWorldObj() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glEnable( 32826 /* GL_RESCALE_NORMAL_EXT */ );
|
||||
GL11.glColor4f( 1.0F, 1.0F, 1.0F, 1.0F );
|
||||
@@ -189,9 +209,13 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
|
||||
CompassResult cr = null;
|
||||
if( skyCompass.getForward() == ForgeDirection.UP || skyCompass.getForward() == ForgeDirection.DOWN )
|
||||
{
|
||||
cr = CompassManager.INSTANCE.getCompassDirection( 0, tile.xCoord, tile.yCoord, tile.zCoord );
|
||||
}
|
||||
else
|
||||
{
|
||||
cr = new CompassResult( false, true, 0 );
|
||||
}
|
||||
|
||||
if( cr.hasResult )
|
||||
{
|
||||
@@ -201,7 +225,9 @@ public class RenderBlockSkyCompass extends BaseBlockRender
|
||||
this.model.renderAll( ( now / 50000.0f ) * (float) Math.PI * 500.0f );
|
||||
}
|
||||
else
|
||||
{
|
||||
this.model.renderAll( (float) ( skyCompass.getForward() == ForgeDirection.DOWN ? this.flipidiy( cr.rad ) : cr.rad ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user