-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'GTNewHorizons:master' into compressor_recipes
- Loading branch information
Showing
39 changed files
with
3,309 additions
and
9,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 24 additions & 16 deletions
40
src/main/java/com/dreammaster/bartworksHandler/BW_RadHatchMaterial.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,41 @@ | ||
package com.dreammaster.bartworksHandler; | ||
|
||
import static com.github.bartimaeusnek.bartworks.API.recipe.BartWorksRecipeMaps.radioHatchRecipes; | ||
import static com.github.bartimaeusnek.bartworks.util.BWRecipes.calcDecayTicks; | ||
import static gregtech.api.enums.Mods.GTPlusPlus; | ||
import static gregtech.api.util.GT_RecipeConstants.DECAY_TICKS; | ||
|
||
import net.minecraft.item.ItemStack; | ||
|
||
import com.github.bartimaeusnek.bartworks.util.BWRecipes; | ||
|
||
import gregtech.api.enums.GT_Values; | ||
import gtPlusPlus.core.material.Material; | ||
import gtPlusPlus.core.util.minecraft.ItemUtils; | ||
|
||
public class BW_RadHatchMaterial { | ||
|
||
public static void runRadHatchAdder() { | ||
if (!GTPlusPlus.isModLoaded()) { | ||
return; | ||
} | ||
|
||
ItemStack err = ItemUtils.getErrorStack(1); | ||
|
||
for (Material material : Material.mMaterialMap) { | ||
if (material == null || material.vRadiationLevel <= 0) { | ||
continue; | ||
} | ||
|
||
if (GTPlusPlus.isModLoaded()) { | ||
ItemStack err = ItemUtils.getErrorStack(1); | ||
|
||
for (Material material : Material.mMaterialMap) { | ||
if (material != null && material.vRadiationLevel > 0) { | ||
int level = (int) material.getProtons(); | ||
short[] rgba = material.getRGBA(); | ||
if (material.getRod(1) != null && !material.getRod(1).isItemEqual(err)) { | ||
BWRecipes.instance.addRadHatch(material.getRod(1), level, 1, rgba); | ||
} | ||
if (material.getLongRod(1) != null && !material.getLongRod(1).isItemEqual(err)) { | ||
BWRecipes.instance.addRadHatch(material.getLongRod(1), level, 2, rgba); | ||
} | ||
} | ||
int level = (int) material.getProtons(); | ||
if (material.getRod(1) != null && !material.getRod(1).isItemEqual(err)) { | ||
GT_Values.RA.stdBuilder().itemInputs(material.getRod(1)).duration(1).eut(level) | ||
.metadata(DECAY_TICKS, (int) calcDecayTicks(level)).noOptimize().addTo(radioHatchRecipes); | ||
} | ||
if (material.getLongRod(1) != null && !material.getLongRod(1).isItemEqual(err)) { | ||
GT_Values.RA.stdBuilder().itemInputs(material.getLongRod(1)).duration(2).eut(level) | ||
.metadata(DECAY_TICKS, (int) calcDecayTicks(level)).noOptimize().addTo(radioHatchRecipes); | ||
} | ||
|
||
} | ||
|
||
} | ||
} |
Oops, something went wrong.