diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-09-14 03:40:12 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2019-09-14 03:40:12 +0200 |
commit | 05be80efe3d7a1a302d75f3d07e19f9133cf8584 (patch) | |
tree | 956fe47cd54b3275ebce2c5d0e138c92c895878f | |
parent | d928b204b81606c6874e5889300cea00e26dcb85 (diff) | |
download | GT5-Unofficial-05be80efe3d7a1a302d75f3d07e19f9133cf8584.tar.gz GT5-Unofficial-05be80efe3d7a1a302d75f3d07e19f9133cf8584.tar.bz2 GT5-Unofficial-05be80efe3d7a1a302d75f3d07e19f9133cf8584.zip |
fixes
+added a warning to not disable Ross after world start
+fixed a lot of broken recipes
+further fixed bridge materials/OreDict
+added Tiberium FuelRods
+fixed lenses not showing up
+fixed gem only materials
+added NoBlast SubTag
Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
Former-commit-id: 4ede8aeef53134b181aba6b15c5e372eda4ef9ea
18 files changed, 410 insertions, 100 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index e3b88b62e8..126a1263f4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -194,6 +194,7 @@ public final class MainMod { GT_LanguageManager.addStringLocalization("achievement.gt.blockmachines.dehp.desc","Get ALL the thermal energy!"); GT_LanguageManager.addStringLocalization("achievement.gt.blockmachines.circuitassemblyline","Cheaper Circuits?"); GT_LanguageManager.addStringLocalization("achievement.gt.blockmachines.circuitassemblyline.desc","Well, yes, but actually no..."); + GT_LanguageManager.addStringLocalization("metaitem.01.tooltip.nqgen","Can be used as Enriched Naquadah Fuel Substitute"); } } @Mod.EventHandler @@ -357,9 +358,11 @@ public final class MainMod { private static void runUnficationDeleter(Werkstoff werkstoff) { if (werkstoff.getType() == Werkstoff.Types.ELEMENT) { - werkstoff.getBridgeMaterial().mElement = Element.get(werkstoff.getToolTip()); - Element.get(werkstoff.getToolTip()).mLinkedMaterials = new ArrayList<>(); - Element.get(werkstoff.getToolTip()).mLinkedMaterials.add(werkstoff.getBridgeMaterial()); + if (werkstoff.getBridgeMaterial() != null) { + werkstoff.getBridgeMaterial().mElement = Element.get(werkstoff.getToolTip()); + Element.get(werkstoff.getToolTip()).mLinkedMaterials = new ArrayList<>(); + Element.get(werkstoff.getToolTip()).mLinkedMaterials.add(werkstoff.getBridgeMaterial()); + } } for (OrePrefixes prefixes : OrePrefixes.values()) @@ -483,7 +486,7 @@ public final class MainMod { private static void addElectricImplosionCompressorRecipes() { if (eicMap == null) { eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet<>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true); - GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.stream().filter(e -> e.mInputs != null).forEach(recipe -> eicMap.addRecipe(true, Arrays.stream(recipe.mInputs).filter(e -> !MainMod.checkForExplosives(e)).distinct().toArray(ItemStack[]::new), recipe.mOutputs, null, null, null, recipe.mDuration, BW_Util.getMachineVoltageFromTier(10), 0)); + GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.stream().filter(e -> e.mInputs != null).forEach(recipe -> eicMap.addRecipe(true, Arrays.stream(recipe.mInputs).filter(e -> !MainMod.checkForExplosives(e)).distinct().toArray(ItemStack[]::new), recipe.mOutputs, null, null, null, 1, BW_Util.getMachineVoltageFromTier(10), 0)); } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java index da0397087e..1f808bae95 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java @@ -107,7 +107,7 @@ public class ConfigHandler { ConfigHandler.ross128btier = ConfigHandler.c.get("CrossMod Interactions", "Rocket Tier - Ross128b", 3, "The Rocket Tier for Ross128b").getInt(3); ConfigHandler.ross128batier = ConfigHandler.c.get("CrossMod Interactions", "Rocket Tier - Ross128ba", 3, "The Rocket Tier for Ross128a").getInt(3); ConfigHandler.ross128bRuinChance = ConfigHandler.c.get("CrossMod Interactions", "Ruin Chance - Ross128b", 512, "Higher Values mean lesser Ruins.").getInt(512); - ConfigHandler.Ross128Enabled = ConfigHandler.c.get("CrossMod Interactions", "Galacticraft - Activate Ross128 System", true, "If the Ross128 System should be activated").getBoolean(true); + ConfigHandler.Ross128Enabled = ConfigHandler.c.get("CrossMod Interactions", "Galacticraft - Activate Ross128 System", true, "If the Ross128 System should be activated, DO NOT CHANGE AFTER WORLD GENERATION").getBoolean(true); ConfigHandler.landerType = ConfigHandler.c.get("CrossMod Interactions", "LanderType", 3, "1 = Moon Lander, 2 = Landing Balloons, 3 = Asteroid Lander").getInt(3); ConfigHandler.disableMagicalForest = ConfigHandler.c.get("CrossMod Interactions", "Disable Magical Forest - Ross128b", false, "True disables the magical Forest Biome on Ross for more performance during World generation.").getBoolean(false); diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java index 9b7f2f44e5..e7a4c3aa02 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_MetaGenerated_Items.java @@ -131,6 +131,10 @@ public class BW_MetaGenerated_Items extends GT_MetaGenerated_Item implements IRa } if (this.orePrefixes == OrePrefixes.crushed) aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.purify.2")); + + if (aStack != null && aStack.getItem() instanceof BW_MetaGenerated_Items && aStack.getItemDamage() == WerkstoffLoader.Tiberium.getmID()) + aList.add(GT_LanguageManager.getTranslation("metaitem.01.tooltip.nqgen")); + aList.add(StatCollector.translateToLocal("tooltip.bw.0.name") + ChatColorHelper.DARKGREEN + " BartWorks"); } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java new file mode 100644 index 0000000000..7f36e43193 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/BW_NonMeta_MaterialItems.java @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2019 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material; + +import gregtech.api.interfaces.IItemContainer; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +import static gregtech.api.enums.GT_Values.W; + +public enum BW_NonMeta_MaterialItems implements IItemContainer { + Depleted_Tiberium_1,Depleted_Tiberium_2,Depleted_Tiberium_4, + TiberiumCell_1,TiberiumCell_2,TiberiumCell_4 + ; + private ItemStack mStack; + private boolean mHasNotBeenSet = true; + + @Override + public IItemContainer set(Item aItem) { + mHasNotBeenSet = false; + if (aItem == null) return this; + ItemStack aStack = new ItemStack(aItem, 1, 0); + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public IItemContainer set(ItemStack aStack) { + mHasNotBeenSet = false; + mStack = GT_Utility.copyAmount(1, aStack); + return this; + } + + @Override + public Item getItem() { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return null; + return mStack.getItem(); + } + + @Override + public Block getBlock() { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + return GT_Utility.getBlockFromItem(getItem()); + } + + @Override + public final boolean hasBeenSet() { + return !mHasNotBeenSet; + } + + @Override + public boolean isStackEqual(Object aStack) { + return isStackEqual(aStack, false, false); + } + + @Override + public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) { + if (GT_Utility.isStackInvalid(aStack)) return false; + return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT); + } + + @Override + public ItemStack get(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWildcard(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getUndamaged(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack)); + } + + @Override + public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) return null; + rStack.setStackDisplayName(aDisplayName); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) { + ItemStack rStack = get(1, aReplacements); + if (GT_Utility.isStackInvalid(rStack)) return null; + GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false); + return GT_Utility.copyAmount(aAmount, rStack); + } + + @Override + public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements); + return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack)); + } + + @Override + public IItemContainer registerOre(Object... aOreNames) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1)); + return this; + } + + @Override + public IItemContainer registerWildcardAsOre(Object... aOreNames) { + if (mHasNotBeenSet) + throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!"); + for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1)); + return this; + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java index 0144404b46..4d138e21db 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/Werkstoff.java @@ -48,9 +48,9 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { private static final Werkstoff.GenerationFeatures DEFAULT_NULL_GENERATION_FEATURES = new Werkstoff.GenerationFeatures().disable(); public static Werkstoff default_null_Werkstoff; - private final List<ISubTagContainer> mOreByProducts = new ArrayList<ISubTagContainer>(); - private final LinkedHashSet<Pair<ISubTagContainer, Integer>> contents = new LinkedHashSet<>(); - HashSet<SubTag> subtags = new HashSet<>(); + private final List<ISubTagContainer> mOreByProducts = new ArrayList<>(); + private final LinkedHashSet<Pair<ISubTagContainer, Integer>> CONTENTS = new LinkedHashSet<>(); + private final HashSet<SubTag> SUBTAGS = new HashSet<>(); private byte[] rgb = new byte[3]; private final String defaultName; private String toolTip; @@ -112,7 +112,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { this.mID = (short) mID; this.generationFeatures = generationFeatures; this.setRgb(BW_ColorUtil.correctCorlorArray(rgba)); - this.contents.addAll(Arrays.asList(contents)); + this.CONTENTS.addAll(Arrays.asList(contents)); this.toolTip = ""; if (toolTip.isEmpty()) { for (Pair<ISubTagContainer, Integer> p : contents) { @@ -125,7 +125,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { this.toolTip += ((Materials) p.getKey()).mChemicalFormula + (p.getValue() > 1 ? BW_Util.subscriptNumber(p.getValue()) : ""); } if (p.getKey() instanceof Werkstoff) { - if (((Werkstoff) p.getKey()).contents.size() > 1 && p.getValue() > 1) + if (((Werkstoff) p.getKey()).CONTENTS.size() > 1 && p.getValue() > 1) // if (((Werkstoff) p.getKey()).toolTip != null && Character.isDigit(((Werkstoff) p.getKey()).toolTip.toCharArray()[((Werkstoff) p.getKey()).toolTip.length()-1])) this.toolTip += "(" + ((Werkstoff) p.getKey()).toolTip + ")" + (BW_Util.subscriptNumber(p.getValue())); else @@ -203,7 +203,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { } public boolean containsStuff(ISubTagContainer stuff){ - for (Pair<ISubTagContainer, Integer> pair : this.contents){ + for (Pair<ISubTagContainer, Integer> pair : this.CONTENTS){ if (pair.getKey().equals(stuff)) return true; } @@ -215,8 +215,8 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { switch (this.type) { case COMPOUND: case BIOLOGICAL: { - for (int i = 0; i < this.contents.toArray().length; i++) { - ret += ((Pair<ISubTagContainer, Integer>) this.contents.toArray()[i]).getValue(); + for (int i = 0; i < this.CONTENTS.toArray().length; i++) { + ret += ((Pair<ISubTagContainer, Integer>) this.CONTENTS.toArray()[i]).getValue(); } break; } @@ -224,7 +224,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { ret = 1; break; } - return new Pair<>(ret, this.contents); + return new Pair<>(ret, this.CONTENTS); } public int getNoOfByProducts() { @@ -296,22 +296,22 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { @Override public boolean contains(SubTag subTag) { - if (!subTag.equals(WerkstoffLoader.NOBLE_GAS) && !subTag.equals(WerkstoffLoader.ANAEROBE_GAS)) - for (Pair<ISubTagContainer, Integer> p : this.contents) + if (!subTag.equals(WerkstoffLoader.NOBLE_GAS) && !subTag.equals(WerkstoffLoader.ANAEROBE_GAS) && !subTag.equals(WerkstoffLoader.NO_BLAST)) + for (Pair<ISubTagContainer, Integer> p : this.CONTENTS) if (p.getKey().contains(subTag)) return true; - return this.subtags.contains(subTag); + return this.SUBTAGS.contains(subTag); } @Override public ISubTagContainer add(SubTag... subTags) { - this.subtags.addAll(Arrays.asList(subTags)); + this.SUBTAGS.addAll(Arrays.asList(subTags)); return this; } @Override public boolean remove(SubTag subTag) { - return this.subtags.remove(subTag); + return this.SUBTAGS.remove(subTag); } public void getAndAddToCollection(OrePrefixes prefixes,int amount,Collection<ItemStack> stacks){ @@ -384,6 +384,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemExquisite,0b100); Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemChipped,0b100); Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.gemFlawless,0b100); + Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.lens,0b100); Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.ore,0b1000); Werkstoff.GenerationFeatures.prefixLogic.put(OrePrefixes.dustImpure,0b1000); @@ -548,7 +549,7 @@ public class Werkstoff implements IColorModulationContainer, ISubTagContainer { return this; } public Werkstoff.GenerationFeatures addMultipleIngotMetalWorkingItems() { - this.toGenerate = (byte) (this.toGenerate | 0b10000000); + this.toGenerate = (byte) (this.toGenerate | 0b1000000000); return this; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java index d4307a13dd..d821007533 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/WerkstoffLoader.java @@ -82,6 +82,7 @@ public class WerkstoffLoader implements Runnable { public static final SubTag ANAEROBE_GAS = SubTag.getNewSubTag("AnaerobeGas"); public static final SubTag ANAEROBE_SMELTING = SubTag.getNewSubTag("AnaerobeSmelting"); public static final SubTag NOBLE_GAS_SMELTING = SubTag.getNewSubTag("NobleGasSmelting"); + public static final SubTag NO_BLAST = SubTag.getNewSubTag("NoBlast"); public static OrePrefixes cellMolten; public static ItemList rotorMold; public static ItemList rotorShape; @@ -1199,9 +1200,9 @@ public class WerkstoffLoader implements Runnable { new short[]{0x22,0xEE,0x22}, "Tiberium", "Tr", - new Werkstoff.Stats().setProtons(123).setMass(326), + new Werkstoff.Stats().setProtons(123).setMass(326).setBlastFurnace(true).setMeltingPoint(1800).setRadioactive(true).setToxic(true), Werkstoff.Types.ELEMENT, - new Werkstoff.GenerationFeatures().onlyDust().addGems(), + new Werkstoff.GenerationFeatures().onlyDust().addGems().addCraftingMetalWorkingItems().addSimpleMetalWorkingItems(), 89, TextureSet.SET_DIAMOND ); @@ -1333,6 +1334,8 @@ public class WerkstoffLoader implements Runnable { WerkstoffLoader.LuVTierMaterial.add(WerkstoffLoader.NOBLE_GAS_SMELTING); + WerkstoffLoader.MagnetoResonaticDust.add(WerkstoffLoader.NO_BLAST); + //Calcium Smelting block Materials.Calcium.mBlastFurnaceRequired=true; @@ -1473,7 +1476,7 @@ public class WerkstoffLoader implements Runnable { public static void runGTItemDataRegistrator(){ HashSet<Materials> toRem = new HashSet<>(); for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) { - Materials werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName().replaceAll(" ", ""), werkstoff.getDefaultName()); + Materials werkstoffBridgeMaterial = werkstoff.getBridgeMaterial() != null ? werkstoff.getBridgeMaterial() : new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName().replaceAll(" ", ""), werkstoff.getDefaultName()); for (OrePrefixes prefixes : values()) { if (!(prefixes == cell && werkstoff.getType().equals(Werkstoff.Types.ELEMENT))) { if (prefixes == dust && werkstoff.getType().equals(Werkstoff.Types.ELEMENT)) { @@ -1487,8 +1490,10 @@ public class WerkstoffLoader implements Runnable { werkstoffBridgeMaterial.mElement = e; e.mLinkedMaterials = new ArrayList<>(); e.mLinkedMaterials.add(werkstoffBridgeMaterial); - GT_OreDictUnificator.addAssociation(dust, werkstoffBridgeMaterial, werkstoff.get(dust), false); - GT_OreDictUnificator.set(dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true); + if (((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(dust)) != 0 && (werkstoff.getGenerationFeatures().blacklist & Werkstoff.GenerationFeatures.prefixLogic.get(dust)) == 0 && werkstoff.get(dust) != null && werkstoff.get(dust).getItem() != null)) { + GT_OreDictUnificator.addAssociation(dust, werkstoffBridgeMaterial, werkstoff.get(dust), false); + GT_OreDictUnificator.set(dust, werkstoffBridgeMaterial, werkstoff.get(dust), true, true); + } ElementSet = true; break; } @@ -1503,14 +1508,15 @@ public class WerkstoffLoader implements Runnable { } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { e.printStackTrace(); } - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); - GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + if (((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(dust)) != 0 && (werkstoff.getGenerationFeatures().blacklist & Werkstoff.GenerationFeatures.prefixLogic.get(dust)) == 0 && werkstoff.get(dust) != null && werkstoff.get(dust).getItem() != null)) { + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(prefixes)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, null, new ItemStack[]{werkstoff.get(prefixes)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } } - } else if ((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(prefixes)) != 0 && (werkstoff.getGenerationFeatures().blacklist & Werkstoff.GenerationFeatures.prefixLogic.get(prefixes)) == 0 && werkstoff.get(prefixes) != null && werkstoff.get(prefixes).getItem() != null) - GT_OreDictUnificator.addAssociation(prefixes, werkstoffBridgeMaterial, werkstoff.get(prefixes), false); + } if (werkstoff.getGenerationFeatures().hasCells()) { werkstoffBridgeMaterial.setHasCorrespondingFluid(true); @@ -1524,6 +1530,8 @@ public class WerkstoffLoader implements Runnable { werkstoffBridgeMaterial.mName = werkstoff.getDefaultName(); toRem.add(werkstoffBridgeMaterial); werkstoff.setBridgeMaterial(werkstoffBridgeMaterial); + if ((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(prefixes)) != 0 && (werkstoff.getGenerationFeatures().blacklist & Werkstoff.GenerationFeatures.prefixLogic.get(prefixes)) == 0 && werkstoff.get(prefixes) != null && werkstoff.get(prefixes).getItem() != null) + GT_OreDictUnificator.addAssociation(prefixes, werkstoffBridgeMaterial, werkstoff.get(prefixes), false); } } } @@ -1619,12 +1627,14 @@ public class WerkstoffLoader implements Runnable { GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemFlawed), werkstoff.get(gemChipped, 2), 64, 16); GT_Values.RA.addForgeHammerRecipe(werkstoff.get(gemChipped), werkstoff.get(dustTiny), 64, 16); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + if (!werkstoff.contains(WerkstoffLoader.NO_BLAST)) { + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawless, 3), 8, werkstoff.get(gemExquisite), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gem, 3), 8, werkstoff.get(gemFlawless), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemFlawed, 3), 8, werkstoff.get(gem), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(gemChipped, 3), 8, werkstoff.get(gemFlawed), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 2)); - GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); + GT_Values.RA.addImplosionRecipe(werkstoff.get(dust, 4), 24, werkstoff.get(gem, 3), GT_OreDictUnificator.get(dustTiny, Materials.DarkAsh, 8)); + } if ((werkstoff.getGenerationFeatures().toGenerate & 2) != 0) { GT_Values.RA.addLatheRecipe(werkstoff.get(plate), werkstoff.get(lens), werkstoff.get(dustSmall), 1200, 120); @@ -1676,16 +1686,21 @@ public class WerkstoffLoader implements Runnable { } private void addCraftingMetalRecipes(Werkstoff werkstoff) { - if ((werkstoff.getGenerationFeatures().toGenerate & 0b100000000) != 0) { + if ((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(screw)) != 0) { int tVoltageMultiplier = werkstoff.getStats().meltingPoint >= 2800 ? 60 : 15; //bolt - GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt,8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); + GT_Values.RA.addExtruderRecipe(werkstoff.getGenerationFeatures().hasGems() ? werkstoff.get(gem) : werkstoff.get(ingot), ItemList.Shape_Extruder_Bolt.get(0L), werkstoff.get(bolt,8), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 8 * tVoltageMultiplier); GT_Values.RA.addCutterRecipe(werkstoff.get(stick), werkstoff.get(bolt,4), null, (int) Math.max(werkstoff.getStats().getMass() * 2L, 1L), 4); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt),new ItemStack[]{werkstoff.get(dustTiny,1)},null,2,8); //screw GT_Values.RA.addLatheRecipe(werkstoff.get(bolt), werkstoff.get(screw),null, (int) Math.max(werkstoff.getStats().getMass() / 8L, 1L), 4); GT_ModHandler.addCraftingRecipe(werkstoff.get(screw), GT_Proxy.tBits, new Object[]{"fX", "X ", 'X', werkstoff.get(bolt)}); + GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw),new ItemStack[]{werkstoff.get(dustTiny,1)},null,2,8); + + if (werkstoff.getGenerationFeatures().hasGems()) + return; //ring GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot), ItemList.Shape_Extruder_Ring.get(0L), werkstoff.get(ring,4), (int) Math.max(werkstoff.getStats().getMass() * 2L, 1), 6 * tVoltageMultiplier); @@ -1733,15 +1748,13 @@ public class WerkstoffLoader implements Runnable { GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGt),new ItemStack[]{werkstoff.get(dust,4)},null,2,8); GT_Values.RA.addPulveriserRecipe(werkstoff.get(gearGtSmall),new ItemStack[]{werkstoff.get(dust,1)},null,2,8); GT_Values.RA.addPulveriserRecipe(werkstoff.get(rotor),new ItemStack[]{werkstoff.get(dust,4),werkstoff.get(dustSmall)},null,2,8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(bolt),new ItemStack[]{werkstoff.get(dustTiny,1)},null,2,8); - GT_Values.RA.addPulveriserRecipe(werkstoff.get(screw),new ItemStack[]{werkstoff.get(dustTiny,1)},null,2,8); GT_Values.RA.addPulveriserRecipe(werkstoff.get(ring),new ItemStack[]{werkstoff.get(dustSmall,1)},null,2,8); } } private void addMultipleMetalRecipes(Werkstoff werkstoff){ - if ((werkstoff.getGenerationFeatures().toGenerate & 0b1000000000) != 0) { - GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true,new ItemStack[]{werkstoff.get(ingot),GT_Utility.getIntegratedCircuit(2)},new ItemStack[]{werkstoff.get(plateDouble)},null,null,null,null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60,0)); + if ((werkstoff.getGenerationFeatures().toGenerate & Werkstoff.GenerationFeatures.prefixLogic.get(plateDense)) != 0) { + GT_Recipe.GT_Recipe_Map.sBenderRecipes.add(new BWRecipes.DynamicGTRecipe(true,new ItemStack[]{werkstoff.get(ingot,2),GT_Utility.getIntegratedCircuit(2)},new ItemStack[]{werkstoff.get(plateDouble)},null,null,null,null, (int) Math.max(werkstoff.getStats().getMass() * 2, 1L), 60,0)); GregTech_API.registerCover(werkstoff.get(plateDouble), new GT_RenderedTexture(werkstoff.getTexSet().mTextures[72], werkstoff.getRGBA(), false), null); GT_Values.RA.addPulveriserRecipe(werkstoff.get(plateDouble),new ItemStack[]{werkstoff.get(dust,2)},null,2,8); } 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 b865c9e39f..f2ac02b257 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 @@ -23,30 +23,21 @@ package com.github.bartimaeusnek.bartworks.system.material.processingLoaders; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems; import com.github.bartimaeusnek.bartworks.system.material.CircuitGeneration.BW_Meta_Items; import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; import com.github.bartimaeusnek.bartworks.util.BWRecipes; import com.github.bartimaeusnek.bartworks.util.BW_Util; -import cpw.mods.fml.common.Loader; import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.util.*; import gregtech.common.items.behaviors.Behaviour_DataOrb; import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.CraftingManager; -import net.minecraft.item.crafting.IRecipe; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; import org.apache.commons.lang3.reflect.FieldUtils; -import org.apache.commons.lang3.reflect.MethodUtils; import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; import java.util.Map; import static com.github.bartimaeusnek.bartworks.util.BW_Util.CLEANROOM; @@ -89,6 +80,9 @@ public class AdditionalRecipes implements Runnable { GT_Values.RA.addAutoclaveRecipe(WerkstoffLoader.MagnetoResonaticDust.get(dust), WerkstoffLoader.Neon.getFluidOrGas(1000), WerkstoffLoader.MagnetoResonaticDust.get(gemChipped, 9), 9000, 4500, BW_Util.getMachineVoltageFromTier(5)); GT_Values.RA.addAutoclaveRecipe(WerkstoffLoader.MagnetoResonaticDust.get(dust), WerkstoffLoader.Krypton.getFluidOrGas(1000), WerkstoffLoader.MagnetoResonaticDust.get(gem), 10000, 4500, BW_Util.getMachineVoltageFromTier(5)); + //Milk + //GT_Values.RA.addFusionReactorRecipe(WerkstoffLoader.Californium.getMolten(16), Materials.Milk.getFluid(12000), WerkstoffLoader.Oganesson.getFluidOrGas(16), 500, 49152, 600000000); + GT_Values.RA.addCentrifugeRecipe(GT_Utility.getIntegratedCircuit(1),null,Materials.Milk.getFluid(10000),Materials.Water.getFluid(8832),Materials.Sugar.getDustSmall(21),Materials.Calcium.getDustTiny(1),Materials.Magnesium.getDustTiny(1),Materials.Potassium.getDustTiny(1),Materials.Sodium.getDustTiny(4),Materials.Phosphor.getDustTiny(1),new int[]{10000,10000,1000,10000,1000,1000},50,120); for (int i = 0; i <= 6; i++) { GT_Recipe.GT_Recipe_Map.sCircuitAssemblerRecipes.add( @@ -126,39 +120,59 @@ public class AdditionalRecipes implements Runnable { Materials.SolderingAlloy.getMolten((i + 1) * 144) }, null, (i + 1) * 1500, BW_Util.getMachineVoltageFromTier(i + 1), CLEANROOM)); } + GT_Recipe.GT_Recipe_Map.sSmallNaquadahReactorFuels.addRecipe(true, new ItemStack[]{WerkstoffLoader.Tiberium.get(bolt)}, new ItemStack[]{}, null, null, null, 0, 0, 12500); + GT_Recipe.GT_Recipe_Map.sLargeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{WerkstoffLoader.Tiberium.get(stick)}, new ItemStack[]{}, null, null, null, 0, 0, 62500); + + try{ + Class map = GT_Recipe.GT_Recipe_Map.class; + GT_Recipe.GT_Recipe_Map sHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils.getField(map,"sHugeNaquadahReactorFuels").get(null); + GT_Recipe.GT_Recipe_Map sExtremeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils.getField(map,"sExtremeNaquadahReactorFuels").get(null); + GT_Recipe.GT_Recipe_Map sUltraHugeNaquadahReactorFuels = (GT_Recipe.GT_Recipe_Map) FieldUtils.getField(map,"sUltraHugeNaquadahReactorFuels").get(null); + sHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{WerkstoffLoader.Tiberium.get(stickLong)}, new ItemStack[]{}, null, null, null, 0, 0, 125000); + sExtremeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{WerkstoffLoader.Tiberium.get(stick)}, new ItemStack[]{}, null, null, null, 0, 0, 31250); + sUltraHugeNaquadahReactorFuels.addRecipe(true, new ItemStack[]{WerkstoffLoader.Tiberium.get(stickLong)}, new ItemStack[]{}, null, null, null, 0, 0, 125000); + }catch (NullPointerException | IllegalAccessException e){} + + new LoadItemContainers().run(); + + GT_Values.RA.addCannerRecipe(ItemList.Large_Fluid_Cell_TungstenSteel.get(1L), WerkstoffLoader.Tiberium.get(dust,3), BW_NonMeta_MaterialItems.TiberiumCell_1.get(1L), null, 30, 16); + GT_Values.RA.addAssemblerRecipe(BW_NonMeta_MaterialItems.TiberiumCell_1.get(2L), GT_OreDictUnificator.get(stick, Materials.TungstenSteel, 4L), BW_NonMeta_MaterialItems.TiberiumCell_2.get(1L), 100, 400); + GT_Values.RA.addAssemblerRecipe(BW_NonMeta_MaterialItems.TiberiumCell_1.get(4L), GT_OreDictUnificator.get(stickLong, Materials.TungstenSteel, 6L), BW_NonMeta_MaterialItems.TiberiumCell_4.get(1L), 150, 400); + GT_Values.RA.addAssemblerRecipe(BW_NonMeta_MaterialItems.TiberiumCell_2.get(2L), GT_OreDictUnificator.get(stick, Materials.TungstenSteel, 4L), BW_NonMeta_MaterialItems.TiberiumCell_4.get(1L), 100, 400); + GregTech_API.sAfterGTPostload.add(new LuVTierEnhancer()); AdditionalRecipes.oldGThelperMethod(); } - private static void oldGThelperMethod(){ - //manual override for older GT - Werkstoff werkstoff = WerkstoffLoader.Oganesson; - Materials werkstoffBridgeMaterial = null; - boolean aElementSet = false; - for (Element e : Element.values()){ - if (e.toString().equals("Uuo")){ - werkstoffBridgeMaterial = new Materials(-1,werkstoff.getTexSet(),0,0,0,false,werkstoff.getDefaultName(),werkstoff.getDefaultName()); - werkstoffBridgeMaterial.mElement = e; - e.mLinkedMaterials.add(werkstoffBridgeMaterial); - aElementSet = true; - break; - } - } - if (!aElementSet) - return; + private static void oldGThelperMethod() { + //manual override for older GT + Werkstoff werkstoff = WerkstoffLoader.Oganesson; + Materials werkstoffBridgeMaterial = null; + boolean aElementSet = false; + for (Element e : Element.values()) { + if (e.toString().equals("Uuo")) { + werkstoffBridgeMaterial = new Materials(-1, werkstoff.getTexSet(), 0, 0, 0, false, werkstoff.getDefaultName(), werkstoff.getDefaultName()); + werkstoffBridgeMaterial.mElement = e; + e.mLinkedMaterials.add(werkstoffBridgeMaterial); + aElementSet = true; + break; + } + } + if (!aElementSet) + return; - GT_OreDictUnificator.addAssociation(cell,werkstoffBridgeMaterial, werkstoff.get(cell),false); - try { - Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); - f.setAccessible(true); - Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); - MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); - } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { - e.printStackTrace(); - } - ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); - Behaviour_DataOrb.setDataTitle(scannerOutput,"Elemental-Scan"); - Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); - GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false,new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass()* 8192L),30,0)); - GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false,new BWRecipes.DynamicGTRecipe(false,new ItemStack[]{Materials.Empty.getCells(1)} ,new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L),30,0)); - } + GT_OreDictUnificator.addAssociation(cell, werkstoffBridgeMaterial, werkstoff.get(cell), false); + try { + Field f = Materials.class.getDeclaredField("MATERIALS_MAP"); + f.setAccessible(true); + Map<String, Materials> MATERIALS_MAP = (Map<String, Materials>) f.get(null); + MATERIALS_MAP.remove(werkstoffBridgeMaterial.mName); + } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { + e.printStackTrace(); + } + ItemStack scannerOutput = ItemList.Tool_DataOrb.get(1L); + Behaviour_DataOrb.setDataTitle(scannerOutput, "Elemental-Scan"); + Behaviour_DataOrb.setDataName(scannerOutput, werkstoff.getToolTip()); + GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{werkstoff.get(cell)}, new ItemStack[]{scannerOutput}, ItemList.Tool_DataOrb.get(1L), null, null, null, (int) (werkstoffBridgeMaterial.getMass() * 8192L), 30, 0)); + GT_Recipe.GT_Recipe_Map.sReplicatorFakeRecipes.addFakeRecipe(false, new BWRecipes.DynamicGTRecipe(false, new ItemStack[]{Materials.Empty.getCells(1)}, new ItemStack[]{werkstoff.get(cell)}, scannerOutput, null, new FluidStack[]{Materials.UUMatter.getFluid(werkstoffBridgeMaterial.getMass())}, null, (int) (werkstoffBridgeMaterial.getMass() * 512L), 30, 0)); + } }
\ No newline at end of file diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java new file mode 100644 index 0000000000..b0d0c2e79c --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/AfterLuVTierEnhacement.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2019 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.processingLoaders; + +import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems; +import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.Materials; +import gregtech.api.util.GT_OreDictUnificator; + +import static gregtech.api.enums.OrePrefixes.*; +import static gregtech.api.enums.OrePrefixes.dust; + +public class AfterLuVTierEnhacement implements Runnable { + + @Override + public void run() { + GT_Values.RA.addCentrifugeRecipe(BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1), null,null,WerkstoffLoader.Xenon.getFluidOrGas(50), + WerkstoffLoader.Zirconium.get(dust), + WerkstoffLoader.Zirconium.get(dust), + WerkstoffLoader.Tiberium.get(dustSmall,2), + WerkstoffLoader.Zirconium.get(dust,2), + GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 8L), + GT_OreDictUnificator.get(dust, Materials.Platinum, 1L), + new int[]{10_000,5_000,5_000,2_500,10_000,10_000},250,2000); + GT_Values.RA.addCentrifugeRecipe(BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1), null,null,WerkstoffLoader.Xenon.getFluidOrGas(100), + WerkstoffLoader.Zirconium.get(dust,2), + WerkstoffLoader.Zirconium.get(dust,2), + WerkstoffLoader.Tiberium.get(dust), + WerkstoffLoader.Zirconium.get(dust,4), + GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 18L), + GT_OreDictUnificator.get(dust, Materials.Platinum, 2L), + new int[]{10_000,5_000,5_000,2_500,10_000,10_000},500,2000); + GT_Values.RA.addCentrifugeRecipe(BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1), null,null,WerkstoffLoader.Xenon.getFluidOrGas(200), + WerkstoffLoader.Zirconium.get(dust,4), + WerkstoffLoader.Zirconium.get(dust,4), + WerkstoffLoader.Tiberium.get(dust,2), + WerkstoffLoader.Zirconium.get(dust,8), + GT_OreDictUnificator.get(dust, Materials.TungstenSteel, 38L), + GT_OreDictUnificator.get(dust, Materials.Platinum, 4L), + new int[]{10_000,5_000,5_000,2_500,10_000,10_000},1000,2000); + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java new file mode 100644 index 0000000000..053b899ea8 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LoadItemContainers.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2019 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.github.bartimaeusnek.bartworks.system.material.processingLoaders; + +import com.github.bartimaeusnek.bartworks.system.material.BW_NonMeta_MaterialItems; +import gregtech.api.items.GT_RadioactiveCellIC_Item; +import gregtech.common.items.GT_DepletetCell_Item; + +public class LoadItemContainers implements Runnable { + + @Override + public void run() { + BW_NonMeta_MaterialItems.Depleted_Tiberium_1.set(new GT_DepletetCell_Item("TiberiumcellDep", "Fuel Rod (Depleted Tiberium)", 1)); + BW_NonMeta_MaterialItems.Depleted_Tiberium_2.set(new GT_DepletetCell_Item("Double_TiberiumcellDep", "Dual Fuel Rod (Depleted Tiberium)", 1)); + BW_NonMeta_MaterialItems.Depleted_Tiberium_4.set(new GT_DepletetCell_Item("Quad_TiberiumcellDep", "Quad Fuel Rod (Depleted Tiberium)", 1)); + BW_NonMeta_MaterialItems.TiberiumCell_1.set(new GT_RadioactiveCellIC_Item("Tiberiumcell", "Fuel Rod (Tiberium)", 1, 50000, 2F, 1, 0.5F, BW_NonMeta_MaterialItems.Depleted_Tiberium_1.get(1), false)); + BW_NonMeta_MaterialItems.TiberiumCell_2.set(new GT_RadioactiveCellIC_Item("Double_Tiberiumcell", "Dual Fuel Rod (Tiberium)", 2, 50000, 2F, 1, 0.5F, BW_NonMeta_MaterialItems.Depleted_Tiberium_2.get(1), false)); + BW_NonMeta_MaterialItems.TiberiumCell_4.set(new GT_RadioactiveCellIC_Item("Quad_Tiberiumcell", "Quad Fuel Rod (Tiberium)", 4, 50000, 2F, 1, 0.5F, BW_NonMeta_MaterialItems.Depleted_Tiberium_4.get(1), false)); + } +} diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java index 7542253844..50c9e0d311 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/LuVTierEnhancer.java @@ -118,6 +118,7 @@ public class LuVTierEnhancer implements Runnable { } } } + new AfterLuVTierEnhacement().run(); } private static void replaceAsslineRecipes(){ diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java index c3e8397117..69bd771eb0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/material/processingLoaders/PlatinumSludgeOverHaul.java @@ -51,11 +51,8 @@ import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import org.apache.commons.lang3.reflect.FieldUtils; -import java.lang.reflect.Array; import java.lang.reflect.Field; import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.*; import static gregtech.api.enums.OrePrefixes.*; @@ -175,7 +172,7 @@ public class PlatinumSludgeOverHaul { GT_Values.RA.addChemicalRecipe(IridiumChloride.get(dust), Materials.Calcium.getDust(3), null, CalciumChloride.getFluidOrGas(3000), PGSDResidue2.get(dust), Materials.Iridium.getDust(1), 300, 1920); //Rh - GT_Values.RA.addChemicalRecipe(RHSulfate.get(cell, 11), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(10000), Materials.Potassium.getMolten(1999), RHSulfateSolution.get(cell, 11), LeachResidue.get(dustTiny, 10), 300, 30); + GT_Values.RA.addChemicalRecipe(RHSulfate.get(cell, 11), GT_Utility.getIntegratedCircuit(1), Materials.Water.getFluid(10000), Materials.Potassium.getMolten(2000), RHSulfateSolution.get(cell, 11), LeachResidue.get(dustTiny, 10), 300, 30); GT_Values.RA.addChemicalRecipe(Materials.Zinc.getDust(1), null, RHSulfateSolution.getFluidOrGas(1000), null, ZincSulfate.get(dust), CrudeRhMetall.get(dust), 300); GT_Values.RA.addBlastRecipe(CrudeRhMetall.get(dust), Materials.Salt.getDust(1), Materials.Chlorine.getGas(1000), null, RHSalt.get(dust, 3), null, 300, 120, 600); @@ -246,16 +243,29 @@ public class PlatinumSludgeOverHaul { for (int i = 0; i < recipe.mFluidOutputs.length; i++) { if (map.equals(GT_Recipe.GT_Recipe_Map.sFluidExtractionRecipes)) continue maploop; - if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i])) - toDel.add(recipe); - else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i])) - toDel.add(recipe); - else if (GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])) - recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); - else if (GT_Utility.areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i])) - recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); - else if (GT_Utility.areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i])) - recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); + else if (map.equals(GT_Recipe.GT_Recipe_Map.sMultiblockChemicalRecipes) || map.equals(GT_Recipe.GT_Recipe_Map.sChemicalRecipes)) { + if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])) + recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); + else if (GT_Utility.areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i])) + recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); + else if (GT_Utility.areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i])) + recipe.mFluidOutputs[i] = Materials.Water.getFluid(1000); + } else { + if (GT_Utility.areFluidsEqual(Ruthenium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Rhodium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Materials.Iridium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Materials.Platinum.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + else if (GT_Utility.areFluidsEqual(Materials.Osmium.getMolten(1), recipe.mFluidOutputs[i])) + toDel.add(recipe); + } } for (int i = 0; i < recipe.mOutputs.length; i++) { if (!GT_Utility.isStackValid(recipe.mOutputs[i])) diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java index ebe2f69dce..8bcffab9b1 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/system/oregen/BW_WorldGenRoss128ba.java @@ -44,8 +44,9 @@ public class BW_WorldGenRoss128ba extends BW_OreLayer { } public static void init_OresRoss128ba() { - new BW_WorldGenRoss128b("ore.mix.ross128ba.tib", true, 30, 60, 6, 1, 16, Tiberium, Naquadah, NaquadahEnriched, NaquadahEnriched); - new BW_WorldGenRoss128b("ore.mix.ross128.Tungstate", true, 5, 40, 10, 4, 14, Ferberite, Huebnerit, Loellingit, Scheelite); + new BW_WorldGenRoss128ba("ore.mix.ross128ba.tib", true, 30, 60, 6, 1, 16, Tiberium, Tiberium, NaquadahEnriched, NaquadahEnriched); + new BW_WorldGenRoss128ba("ore.mix.ross128.Tungstate", true, 5, 40, 10, 4, 14, Ferberite, Huebnerit, Loellingit, Scheelite); + new BW_WorldGenRoss128ba("ore.mix.ross128ba.bart", true, 30, 60, 1, 1, 3, BArTiMaEuSNeK, BArTiMaEuSNeK, BArTiMaEuSNeK, BArTiMaEuSNeK); } diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png b/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png Binary files differnew file mode 100644 index 0000000000..bfe6e2288b --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.Double_Tiberiumcell.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png b/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png Binary files differnew file mode 100644 index 0000000000..a7d2c341a2 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.Double_TiberiumcellDep.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png b/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png Binary files differnew file mode 100644 index 0000000000..85aa8c19a1 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.Quad_Tiberiumcell.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png b/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png Binary files differnew file mode 100644 index 0000000000..0a71854e05 --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.Quad_TiberiumcellDep.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png b/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png Binary files differnew file mode 100644 index 0000000000..4071c6062d --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.Tiberiumcell.png diff --git a/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png b/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png Binary files differnew file mode 100644 index 0000000000..bafc8a4c8c --- /dev/null +++ b/src/main/resources/assets/gregtech/textures/items/gt.TiberiumcellDep.png |