diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-09-10 17:00:42 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-09-10 17:00:42 +1000 |
commit | 8931cf08cc1710c018bc332974306d623dfac03f (patch) | |
tree | 6fb59caf22fd46f8074919ea6158a6fca857aed1 /src/Java/gtPlusPlus/core/util | |
parent | a5ab04af307c9ff03a47461afeadc5256d97fd89 (diff) | |
download | GT5-Unofficial-8931cf08cc1710c018bc332974306d623dfac03f.tar.gz GT5-Unofficial-8931cf08cc1710c018bc332974306d623dfac03f.tar.bz2 GT5-Unofficial-8931cf08cc1710c018bc332974306d623dfac03f.zip |
+ Added the first proper chemical dehydrator recipes, for Lithium carbonate.
+ Added methods to UtilsItems to check if something is radioactive and how radioactive it is 0-3.
- Removed all old dehydrator recipes used in testing.
- Removed some old hard-coded items now generated by the material handler. (No items will be lost, as I doubt anyone ever obtained them.)
$ Fixed some broken textures after refactoring the entire project a few commits ago.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/item/UtilsItems.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/item/UtilsItems.java b/src/Java/gtPlusPlus/core/util/item/UtilsItems.java index 6eb5335035..478e707782 100644 --- a/src/Java/gtPlusPlus/core/util/item/UtilsItems.java +++ b/src/Java/gtPlusPlus/core/util/item/UtilsItems.java @@ -8,6 +8,7 @@ import gtPlusPlus.core.item.ModItems; import gtPlusPlus.core.item.base.BasicSpawnEgg; import gtPlusPlus.core.item.base.bolts.BaseItemBolt; import gtPlusPlus.core.item.base.dusts.BaseItemDust; +import gtPlusPlus.core.item.base.dusts.BaseItemDustSpecialUse; import gtPlusPlus.core.item.base.gears.BaseItemGear; import gtPlusPlus.core.item.base.ingots.BaseItemIngot; import gtPlusPlus.core.item.base.ingots.BaseItemIngotHot; @@ -327,6 +328,23 @@ public class UtilsItems { } + public static Item[] generateDusts(String unlocalizedName, String materialName, int materialTier, MaterialInfo matInfo, int Colour, boolean hotIngot){ + int radioactive = getRadioactivityLevel(materialName); + Item[] output = { + new BaseItemDust("itemDust"+unlocalizedName, materialName, matInfo, Colour, "Dust", hotIngot, materialTier, radioactive), + new BaseItemDust("itemDustSmall"+unlocalizedName, materialName, matInfo, Colour, "Small", hotIngot, materialTier, radioactive), + new BaseItemDust("itemDustTiny"+unlocalizedName, materialName, matInfo, Colour, "Tiny", hotIngot, materialTier, radioactive)}; + return output; + } + + public static Item[] generateSpecialUseDusts(String unlocalizedName, String materialName, int Colour){ + Item[] output = { + new BaseItemDustSpecialUse("itemDust"+unlocalizedName, materialName, Colour, "Dust"), + new BaseItemDustSpecialUse("itemDustSmall"+unlocalizedName, materialName, Colour, "Small"), + new BaseItemDustSpecialUse("itemDustTiny"+unlocalizedName, materialName, Colour, "Tiny")}; + return output; + } + public static MultiPickaxeBase generateMultiPick(Materials material){ ToolMaterial customMaterial = Utils.generateMaterialFromGT(material); short[] rgb; @@ -348,6 +366,37 @@ public class UtilsItems { } + public static boolean isRadioactive(String materialName){ + int sRadiation = 0; + if (materialName.toLowerCase().contains("uranium")){ + sRadiation = 2; + } + else if (materialName.toLowerCase().contains("plutonium")){ + sRadiation = 4; + } + else if (materialName.toLowerCase().contains("thorium")){ + sRadiation = 1; + } + if (sRadiation >= 1){ + return true; + } + return false; + } + + public static int getRadioactivityLevel(String materialName){ + int sRadiation = 0; + if (materialName.toLowerCase().contains("uranium")){ + sRadiation = 2; + } + else if (materialName.toLowerCase().contains("plutonium")){ + sRadiation = 4; + } + else if (materialName.toLowerCase().contains("thorium")){ + sRadiation = 1; + } + return sRadiation; + } + public static String getArrayStackNames(ItemStack[] aStack){ String itemNames = "Item Array: "; for (ItemStack alph : aStack){ |