diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-10-31 12:46:19 +0100 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-10-31 12:46:19 +0100 |
commit | 0891442b1a5abf98c56fb3e42cbbcb08c77bdd5f (patch) | |
tree | 2251ca9b4b42151cf639778145bb942a9b39f187 /src/main | |
parent | 930944f5f0cee1bca1241e0bc179edcbe265d3bb (diff) | |
download | GT5-Unofficial-0891442b1a5abf98c56fb3e42cbbcb08c77bdd5f.tar.gz GT5-Unofficial-0891442b1a5abf98c56fb3e42cbbcb08c77bdd5f.tar.bz2 GT5-Unofficial-0891442b1a5abf98c56fb3e42cbbcb08c77bdd5f.zip |
fixes
+fixed some recipes
+fixed structure check for Circuit assembly line
+added Formic acid to the acid gen
+re-blacklisted planet stone dust for platinum overhaul
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
Former-commit-id: 5db7bb137eb62c157546e97c78cf00779107e4c4
Diffstat (limited to 'src/main')
4 files changed, 71 insertions, 33 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 964dfdf7c7..6a16da0256 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -199,6 +199,9 @@ public final class MainMod { GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.nqgen","Can be used as Enriched Naquadah Fuel Substitute"); } } + + private static boolean recipesAdded; + @Mod.EventHandler public void onServerStarted(FMLServerStartedEvent event) { MainMod.runOnPlayerJoined(ConfigHandler.classicMode, ConfigHandler.disableExtraGassesForEBF); @@ -206,23 +209,26 @@ public final class MainMod { public static void runOnPlayerJoined(boolean classicMode, boolean extraGasRecipes){ OreDictHandler.adaptCacheForWorld(); - removeIC2Recipes(); - MainMod.addElectricImplosionCompressorRecipes(); - MainMod.unificationEnforcer(); + if (!recipesAdded) { + removeIC2Recipes(); + MainMod.addElectricImplosionCompressorRecipes(); + MainMod.unificationEnforcer(); - PlatinumSludgeOverHaul.replacePureElements(); + PlatinumSludgeOverHaul.replacePureElements(); - if (!extraGasRecipes) { - ArrayListMultimap<SubTag, GT_Recipe> toChange = MainMod.getRecipesToChange(NOBLE_GAS, ANAEROBE_GAS); - HashSet<ItemStack> noGas = MainMod.getNoGasItems(toChange); - MainMod.editRecipes(toChange, noGas); - } - new CircuitImprintLoader().run(); - if (classicMode) - new DownTierLoader().run(); - runOnServerStarted(); - fixEnergyRequirements(); + if (!extraGasRecipes) { + ArrayListMultimap<SubTag, GT_Recipe> toChange = MainMod.getRecipesToChange(NOBLE_GAS, ANAEROBE_GAS); + HashSet<ItemStack> noGas = MainMod.getNoGasItems(toChange); + MainMod.editRecipes(toChange, noGas); + } + new CircuitImprintLoader().run(); + if (classicMode) + new DownTierLoader().run(); + runOnServerStarted(); + fixEnergyRequirements(); // removeDuplicateRecipes(); + recipesAdded = true; + } } private static void fixEnergyRequirements() { @@ -231,7 +237,7 @@ public final class MainMod { for (GT_Recipe recipe : map.mRecipeList){ if (recipe.mFakeRecipe) continue maploop; - for (int i = 0; i < VN.length; i++) { + for (int i = 0; i < (VN.length-1); i++) { if (recipe.mEUt == BW_Util.getTierVoltage(i)){ recipe.mEUt = BW_Util.getMachineVoltageFromTier(i); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java index 39cc442a3e..11382078cd 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_CircuitAssemblyLine.java @@ -103,11 +103,17 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl } @Override - public void saveNBTData(NBTTagCompound aNBT) { + public void setItemNBT(NBTTagCompound aNBT) { if (!this.type.equals(new NBTTagCompound())) aNBT.setTag("Type", this.type); super.saveNBTData(aNBT); + } + @Override + public void saveNBTData(NBTTagCompound aNBT) { + if (!this.type.equals(new NBTTagCompound())) + aNBT.setTag("Type", this.type); + super.saveNBTData(aNBT); } private final Collection<GT_Recipe> GT_RECIPE_COLLECTION = new HashSet<>(); @@ -173,38 +179,63 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl int yBase = aBaseMetaTileEntity.getYCoord(); int zBase = aBaseMetaTileEntity.getZCoord() + zDir; - boolean rl = xDir == 0; + boolean sided = xDir == 0; - if (rl) + if (sided) ++zBase; else ++xBase; int length = 0; + boolean backwards = false; + + while (true) { - IGregTechTileEntity igtte = aBaseMetaTileEntity.getIGregTechTileEntity(rl ? xBase + length : xBase - 1, yBase - 2, rl ? zBase - 1 : zBase + length); - if (igtte == null) - return false; + IGregTechTileEntity igtte = aBaseMetaTileEntity.getIGregTechTileEntity(sided ? xBase + length : xBase - 1, yBase - 2, sided ? zBase - 1 : zBase + length); + if (igtte == null){ + backwards = true; + length = 0; + break; + } if (igtte.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_OutputBus) break; ++length; - if (length > 7) - return false; + if (length > 7){ + backwards = true; + length = 0; + break; + } + } + if (backwards) + while (true) { + IGregTechTileEntity igtte = aBaseMetaTileEntity.getIGregTechTileEntity(sided ? xBase + length : xBase - 1, yBase - 2, sided ? zBase - 1 : zBase + length); + if (igtte == null) + return false; + + if (igtte.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_OutputBus) + break; + + --length; - if (rl) + if (length < -7){ + return false; + } + + } + + if (sided) zBase -= 2; else xBase -= 2; - - for (int x = 0; x <= (rl ? length : 2); x++) { + for (int x = (backwards && sided ? length : 0); x <= (backwards && sided ? 0 : (sided ? length : 2)); x++) { for (int y = -2; y <= 0; y++) { - for (int z = 0; z <= (rl ? 2 : length); z++) { - if (x == 0 && y == 0 && z == 0) + for (int z = (backwards && !sided ? length : 0); z <= (backwards && !sided ? 0 : (sided ? 2 : length)); z++) { + if (xBase + x == this.getBaseMetaTileEntity().getXCoord() && yBase + y == this.getBaseMetaTileEntity().getYCoord() && zBase + z == this.getBaseMetaTileEntity().getZCoord()) continue; IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntity(xBase + x, yBase + y, zBase + z); @@ -213,16 +244,16 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl switch (y) { case -2: { - switch (rl ? z : x) { + switch (sided ? z : x) { case 0: case 2: { if (!this.addMaintenanceToMachineList(tTileEntity, 16) && !this.addInputToMachineList(tTileEntity, 16)) - if (block != GregTech_API.sBlockCasings2 && meta != 0) + if (block != GregTech_API.sBlockCasings2 || meta != 0) return false; break; } case 1: { - if (!this.addInputToMachineList(tTileEntity, 16) && !((rl ? x : z) == length && this.addOutputToMachineList(tTileEntity, 16))) + if (!this.addInputToMachineList(tTileEntity, 16) && !((sided ? x : z) == length && this.addOutputToMachineList(tTileEntity, 16))) return false; break; } @@ -232,7 +263,7 @@ public class GT_TileEntity_CircuitAssemblyLine extends GT_MetaTileEntity_MultiBl break; } case -1: { - switch (rl ? z : x) { + switch (sided ? z : x) { case 0: case 2: { if (BW_Util.calculateGlassTier(block, meta) < 4) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java index dc7f5f3977..ea43acd6d0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/GT_Enhancement/PlatinumSludgeOverHaul.java @@ -544,7 +544,7 @@ public class PlatinumSludgeOverHaul { if (GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId.equals(BartWorksCrossmod.MOD_ID)) return true; - if (GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId.equals("dreamcraft")) + if (GameRegistry.findUniqueIdentifierFor(stack.getItem()).modId.equals("dreamcraft") && !stack.getUnlocalizedName().contains("dust") && !stack.getUnlocalizedName().contains("Dust") ) return true; if (Block.getBlockFromItem(stack.getItem()) instanceof GT_Generic_Block && !(Block.getBlockFromItem(stack.getItem()) instanceof GT_Block_Ores_Abstract)) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java index d6a1f898aa..5fc62e830f 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AdditionalRecipes.java @@ -50,6 +50,7 @@ public class AdditionalRecipes implements Runnable { @Override public void run() { + ((BWRecipes.BW_Recipe_Map_LiquidFuel)BWRecipes.instance.getMappingsFor((byte) 2)).addLiquidFuel(WerkstoffLoader.FormicAcid.getBridgeMaterial(),40); //Thorium/Yttrium Glas GT_Values.RA.addBlastRecipe(WerkstoffLoader.YttriumOxide.get(dustSmall, 2), WerkstoffLoader.Thorianit.get(dustSmall, 2), Materials.Glass.getMolten(144), null, new ItemStack(ItemRegistry.bw_glasses[0], 1, 12), null, 800, BW_Util.getMachineVoltageFromTier(5), 3663); //Thorianit recipes |