Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Merge branch 'werkfix' into test
Browse files Browse the repository at this point in the history
Former-commit-id: 25433b88827bf5f60af26f1a6df80751d6abb8d6
  • Loading branch information
Dream-Master committed Feb 3, 2022
2 parents 9446efd + dff1fc7 commit 6093abd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private static void enforceNobleGas(Werkstoff werkstoff) {

public static void unificationRecipeEnforcer() {
for (Werkstoff werkstoff : Werkstoff.werkstoffHashSet) {
StaticRecipeChangeLoaders.runMaterialLinker(werkstoff);
if (werkstoff.getGenerationFeatures().enforceUnification) {

if (werkstoff.contains(NOBLE_GAS))
Expand Down Expand Up @@ -262,6 +263,24 @@ private static void runUnficationDeleter(Werkstoff werkstoff) {
}
}

private static void runMaterialLinker(Werkstoff werkstoff) {
if (werkstoff.getType() == Werkstoff.Types.ELEMENT) {
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())
if (werkstoff.hasItemType(prefixes)) {
GT_OreDictUnificator.set(prefixes, werkstoff.getBridgeMaterial(), werkstoff.get(prefixes), true, true);
for (ItemStack stack : OreDictionary.getOres(prefixes + werkstoff.getVarName())) {
GT_OreDictUnificator.addAssociation(prefixes, werkstoff.getBridgeMaterial(), stack, false);
}
}
}

private static ArrayListMultimap<SubTag, GT_Recipe> getRecipesToChange(SubTag... GasTags) {
ArrayListMultimap<SubTag, GT_Recipe> toAdd = ArrayListMultimap.create();
for (GT_Recipe recipe : GT_Recipe.GT_Recipe_Map.sBlastRecipes.mRecipeList) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1631,8 +1631,8 @@ private static void addItemsForGeneration() {
}
}
for (OrePrefixes p : values())
if (!werkstoff.getGenerationFeatures().enforceUnification && (werkstoff.getGenerationFeatures().toGenerate & p.mMaterialGenerationBits) != 0 && OreDictHandler.getItemStack(werkstoff.getDefaultName(), p, 1) != null) {
DebugLog.log("Found: " + (p + werkstoff.getVarName()) + " in oreDict, disable and reroute my Items to that, also add a Tooltip.");
if (Materials.get(werkstoff.getDefaultName()) != null && Materials.get(werkstoff.getDefaultName()).mMetaItemSubID != -1 && (werkstoff.getGenerationFeatures().toGenerate & p.mMaterialGenerationBits) != 0 && OreDictHandler.getItemStack(werkstoff.getDefaultName(), p, 1) != null) {
DebugLog.log("Found: " + (p + werkstoff.getVarName()) + " in GT material system, disable and reroute my Items to that, also add a Tooltip.");
werkstoff.getGenerationFeatures().setBlacklist(p);
}
WerkstoffLoader.toGenerateGlobal = (WerkstoffLoader.toGenerateGlobal | werkstoff.getGenerationFeatures().toGenerate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void run(Werkstoff werkstoff) {
GT_ModHandler.addCraftingRecipe(GT_MetaGenerated_Tool_01.INSTANCE.getToolWithStats(GT_MetaGenerated_Tool_01.SCREWDRIVER_LV, 1, werkstoff.getBridgeMaterial(), Materials.Steel, new long[]{50000L, 32L, 1L, -1L}), GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GT_ModHandler.RecipeBits.BUFFERED, new Object[]{"PdX", "MGS", "GBP", 'X', stickLong.get(werkstoff.getBridgeMaterial()), 'M', ItemList.Electric_Motor_LV.get(1L), 'S', screw.get(Materials.Steel), 'P', plate.get(Materials.Steel), 'G', gearGtSmall.get(Materials.Steel), 'B', ItemList.Battery_RE_LV_Sodium.get(1L)});

GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(toolHeadHammer, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"II ", "IIh", "II ", 'P', plate.get(werkstoff.getBridgeMaterial()), 'I', ingot.get(werkstoff.getBridgeMaterial())});
if (werkstoff.hasItemType(plateDouble)) {
if (werkstoff.hasItemType(plateDouble) && werkstoff.hasItemType(cellMolten)) {
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(turbineBlade, werkstoff.getBridgeMaterial(), 1L), GT_Proxy.tBits, new Object[]{"fPd", "SPS", " P ", 'P', plateDouble.get(werkstoff.getBridgeMaterial()), 'S', screw.get(werkstoff.getBridgeMaterial())});
GT_Values.RA.addExtruderRecipe(werkstoff.get(ingot, 6), ItemList.Shape_Extruder_Turbine_Blade.get(0), werkstoff.get(turbineBlade, 1), (int) werkstoff.getStats().getMass() / 2 * 20, 120);
GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Turbine_Blade.get(0), werkstoff.getMolten(864), werkstoff.get(turbineBlade, 1), (int) werkstoff.getStats().getMass() * 20, 120);
Expand Down

0 comments on commit 6093abd

Please sign in to comment.