diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-02-19 04:03:45 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-02-19 04:03:45 +1000 |
commit | e6daa173c0a6ba75c2ecd61704ac4fa91aa999e9 (patch) | |
tree | 2cbfc2a95da365633ec7db1cba283301480a2509 /src/Java/gtPlusPlus | |
parent | 29f928e7e660f37496c2afceaf397ba555b5ad52 (diff) | |
download | GT5-Unofficial-e6daa173c0a6ba75c2ecd61704ac4fa91aa999e9.tar.gz GT5-Unofficial-e6daa173c0a6ba75c2ecd61704ac4fa91aa999e9.tar.bz2 GT5-Unofficial-e6daa173c0a6ba75c2ecd61704ac4fa91aa999e9.zip |
$ Fixed an issue where invalid fluids generated, causing the fluid registry to corrupt.
% LFTR & FFPP work.
Diffstat (limited to 'src/Java/gtPlusPlus')
4 files changed, 37 insertions, 13 deletions
diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 6f111b6551..e1aa0d730b 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -30,7 +30,7 @@ public class Material { private ArrayList<MaterialStack> vMaterialInput = new ArrayList<MaterialStack>(); public final long[] vSmallestRatio; public final short vComponentCount; - + private final short[] RGBA; private final boolean usesBlastFurnace; @@ -101,7 +101,7 @@ public class Material { if (m.getStackMaterial().vDurability != 0){ durabilityTemp = (durabilityTemp+m.getStackMaterial().vDurability); counterTemp++; - + } } } @@ -425,12 +425,12 @@ public class Material { } return new int[]{}; } - + private final short getComponentCount(MaterialStack[] inputs){ int counterTemp = 0; for (MaterialStack m : inputs){ if (m.getStackMaterial() != null){ - counterTemp++; + counterTemp++; } } if (counterTemp != 0){ @@ -538,6 +538,13 @@ public class Material { } public final Fluid generateFluid(){ + + try { + if (Materials.get(localizedName) == Materials.Clay){ + return null; + } + } catch (Throwable e){} + if (Materials.get(localizedName).mFluid == null){ Utils.LOG_WARNING("Generating our own fluid."); @@ -562,7 +569,7 @@ public class Material { public final Fluid generatePlasma(){ Materials isValid = Materials.get(getLocalizedName()); - if (isValid != Materials._NULL && isValid != null){ + if (isValid != Materials._NULL && isValid != null && isValid != Materials.Clay){ if (isValid.mPlasma != null){ Utils.LOG_INFO("Using a pre-defined Plasma from GT."); return isValid.mPlasma; diff --git a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java index 2a3527e9d1..8163648c41 100644 --- a/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java +++ b/src/Java/gtPlusPlus/core/util/fluid/FluidUtils.java @@ -2,10 +2,8 @@ package gtPlusPlus.core.util.fluid; import gregtech.api.enums.*; import gregtech.api.util.GT_LanguageManager; -import gregtech.api.util.GT_OreDictUnificator; import gtPlusPlus.core.fluids.GenericFluid; import gtPlusPlus.core.item.base.BaseItemComponent; -import gtPlusPlus.core.item.base.cell.BaseItemCell; import gtPlusPlus.core.item.base.cell.BaseItemPlasmaCell; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.material.MaterialStack; @@ -231,6 +229,9 @@ public class FluidUtils { } public static Fluid addGTPlasma(Material aMaterial) { + if (aMaterial.getLocalizedName().toLowerCase().contains("clay")){ + return null; + } Utils.LOG_INFO("Generating a "+aMaterial.getLocalizedName()+" Plasma Cell"); if (aMaterial.vComponentCount != 1){ Utils.LOG_INFO("Compound made from: "); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java index f6dff6853e..c72c374017 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java @@ -1,6 +1,7 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi; -import gregtech.api.enums.*; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -193,22 +194,32 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 13) { Utils.LOG_INFO("Glass Casings Missing from somewhere in the second layer."); + Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } } //Deal with top and Bottom edges (Inner 5x5) else if (h == 0 || h == 3) { - if ((!addMaintenanceToMachineList(tTileEntity, 70)) && (!addInputToMachineList(tTileEntity, 70)) && (!addOutputToMachineList(tTileEntity, 70)) && (!addDynamoToMachineList(tTileEntity, 70))) { + if ((!addToMachineList(tTileEntity, 70)) && (!addInputToMachineList(tTileEntity, 70)) && (!addOutputToMachineList(tTileEntity, 70)) && (!addDynamoToMachineList(tTileEntity, 70))) { if ((xDir + i != 0) || (zDir + j != 0)) {//no controller + if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != ModBlocks.blockCasingsMisc) { Utils.LOG_INFO("LFTR Casing(s) Missing from one of the edges on the top layer."); Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); return false; } if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j) != 12) { - Utils.LOG_INFO("LFTR Casing(s) Missing from one of the edges on the top layer."); - return false; + Utils.LOG_INFO("LFTR Casing(s) Missing from one of the edges on the top layer. "+h); + Utils.LOG_INFO("Instead, found "+aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j).getLocalizedName()); + if (h ==0){ + if (tTileEntity instanceof GregtechMTE_NuclearReactor){ + + } + } + else { + return false; + } } } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java index cb82a0bc6b..fc3f930f8b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_Refinery.java @@ -230,6 +230,7 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc } } else { + Utils.LOG_INFO("debug.1"); return false; } } @@ -245,6 +246,7 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc } } else { + Utils.LOG_INFO("debug.2"); return false; } } @@ -260,6 +262,7 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc } } else { + Utils.LOG_INFO("debug.3"); return false; } } @@ -274,6 +277,7 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc } } else { + Utils.LOG_INFO("debug.4"); return false; } } @@ -287,9 +291,10 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc } } - if (mInputHatches.size() != 2 || mOutputHatches.size() != 2 || + if (mInputHatches.size() != 4 || mOutputHatches.size() != 2 || mOutputBusses.size() != 1 || mMufflerHatches.size() != 1 || mMaintenanceHatches.size() != 2 || mEnergyHatches.size() < 1){ + Utils.LOG_INFO("Wrong Hatch count."); return false; } if (mMufflerHatches.size() == 1){ @@ -297,7 +302,7 @@ public class GregtechMetaTileEntity_Refinery extends GT_MetaTileEntity_MultiBloc Utils.LOG_INFO("Your Muffler must be AT LEAST ZPM tier or higher."); } } - + Utils.LOG_INFO("Multiblock Formed."); return true; } |