aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
authorDavid Vierra <codewarrior@hawaii.rr.com>2018-01-29 04:40:23 -1000
committerDavid Vierra <codewarrior@hawaii.rr.com>2018-01-29 05:14:27 -1000
commit92194518d60c18f7cd653ab9e9bdc4438d97bccc (patch)
tree4f9fd94ec320252ebb76c48c8cd2b1a290588a64 /src/Java/gtPlusPlus/xmod/gregtech
parent1b4db193e30b0d0aa04636ff54a23d63f5950e04 (diff)
downloadGT5-Unofficial-92194518d60c18f7cd653ab9e9bdc4438d97bccc.tar.gz
GT5-Unofficial-92194518d60c18f7cd653ab9e9bdc4438d97bccc.tar.bz2
GT5-Unofficial-92194518d60c18f7cd653ab9e9bdc4438d97bccc.zip
Change IndustrialWashPlant.checkWater() to only fill the basin
No longer tries to do `checkMachine()` things like add buses and hatches
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java77
1 files changed, 29 insertions, 48 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
index 7fd8ce871a..3bdfd53983 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialWashPlant.java
@@ -257,60 +257,41 @@ extends GregtechMeta_MultiBlockBase {
final int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * mCurrentDirectionZ;
int tAmount = 0;
- for (int i = mOffsetX_Lower; i <=mOffsetX_Upper; ++i) {
- for (int j = mOffsetZ_Lower; j <= mOffsetZ_Upper; ++j) {
- for (int h = -1; h < 2; ++h) {
- if ((h != 0) || ((((xDir + i != 0) || (zDir + j != 0))) && (((i != 0) || (j != 0))))) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, h,
- zDir + j);
- if (!addToMachineList(tTileEntity)) {
- Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
- byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
- if ((tBlock != getCasingBlock()) && (tMeta != getCasingMeta())) {
- if ((i != mOffsetX_Lower && j != mOffsetZ_Lower
- && i != mOffsetX_Upper && j != mOffsetZ_Upper) && (h == 0 || h == 1)){
- if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water){
- if (this.getStoredFluids() != null){
- for (FluidStack stored : this.getStoredFluids()){
- if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))){
- if (stored.amount >= 1000){
- //Utils.LOG_WARNING("Going to try swap an air block for water from inut bus.");
- stored.amount -= 1000;
- Block fluidUsed = null;
- if (tBlock == Blocks.air || tBlock == Blocks.flowing_water){
- fluidUsed = Blocks.water;
- }
- if (tBlock == Blocks.water){
- fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater);
- }
- aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord()+xDir + i, aBaseMetaTileEntity.getYCoord()+h, aBaseMetaTileEntity.getZCoord()+zDir + j, fluidUsed);
-
-
-
- }
- }
- }
+ for (int i = mOffsetX_Lower + 1; i <= mOffsetX_Upper - 1; ++i) {
+ for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) {
+ for (int h = 0; h < 2; ++h) {
+ Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j);
+ byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j);
+ if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) {
+ if (this.getStoredFluids() != null) {
+ for (FluidStack stored : this.getStoredFluids()) {
+ if (stored.isFluidEqual(FluidUtils.getFluidStack("water", 1))) {
+ if (stored.amount >= 1000) {
+ //Utils.LOG_WARNING("Going to try swap an air block for water from inut bus.");
+ stored.amount -= 1000;
+ Block fluidUsed = null;
+ if (tBlock == Blocks.air || tBlock == Blocks.flowing_water) {
+ fluidUsed = Blocks.water;
}
- }
- if (tBlock == Blocks.water){
- ++tAmount;
- //Utils.LOG_WARNING("Found Water");
- }
- else if (tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)){
- ++tAmount;
- ++tAmount;
- //Utils.LOG_WARNING("Found Distilled Water");
+ if (tBlock == Blocks.water) {
+ fluidUsed = BlocksItems.getFluidBlock(InternalName.fluidDistilledWater);
+ }
+ aBaseMetaTileEntity.getWorld().setBlock(aBaseMetaTileEntity.getXCoord() + xDir + i, aBaseMetaTileEntity.getYCoord() + h, aBaseMetaTileEntity.getZCoord() + zDir + j, fluidUsed);
+
+
}
}
- else {
- //Utils.LOG_WARNING("[x] Did not form - Found: "+tBlock.getLocalizedName() + " | "+tBlock.getDamageValue(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord()+ i, aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord() + j));
- //Utils.LOG_WARNING("[x] Did not form - Found: "+(aBaseMetaTileEntity.getXCoord()+xDir + i) +" | "+ aBaseMetaTileEntity.getYCoord()+" | "+ (aBaseMetaTileEntity.getZCoord()+zDir + j));
- return false;
- }
-
}
}
}
+ if (tBlock == Blocks.water) {
+ ++tAmount;
+ //Utils.LOG_WARNING("Found Water");
+ } else if (tBlock == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater)) {
+ ++tAmount;
+ ++tAmount;
+ //Utils.LOG_WARNING("Found Distilled Water");
+ }
}
}
}