aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-10-06 00:46:53 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-10-06 00:46:53 +1000
commite230c773e0fc305bff3e3c4d1ed1e36878b02b29 (patch)
treedd4b9bd44ffe9cf264f7d646f2f2c8da78166c1b /src/Java/gtPlusPlus/core/util
parent91a7d38056f186a7f5f254b9ed97c47d12b50382 (diff)
downloadGT5-Unofficial-e230c773e0fc305bff3e3c4d1ed1e36878b02b29.tar.gz
GT5-Unofficial-e230c773e0fc305bff3e3c4d1ed1e36878b02b29.tar.bz2
GT5-Unofficial-e230c773e0fc305bff3e3c4d1ed1e36878b02b29.zip
+ Added the Big Shovels, which are 3x3 shovels.
+ Updated Generated Tools and their damage taken when mining blocks. > Now meta-tools only generate if they have a valid colour, durability and recipe contains valid components. $ Fixed Fluid Cell Recipes between .08/.09 branches. % Cleaned up some old textures. + Added a log message to output total recipes the mod has added for crafting table use. + Started the base work for extra NBT data saving for GT TileEntities.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/item/UtilsItems.java41
1 files changed, 40 insertions, 1 deletions
diff --git a/src/Java/gtPlusPlus/core/util/item/UtilsItems.java b/src/Java/gtPlusPlus/core/util/item/UtilsItems.java
index 197482f1ae..52392aeb00 100644
--- a/src/Java/gtPlusPlus/core/util/item/UtilsItems.java
+++ b/src/Java/gtPlusPlus/core/util/item/UtilsItems.java
@@ -20,6 +20,7 @@ import gtPlusPlus.core.item.base.rods.BaseItemRodLong;
import gtPlusPlus.core.item.base.rotors.BaseItemRotor;
import gtPlusPlus.core.item.base.screws.BaseItemScrew;
import gtPlusPlus.core.item.tool.staballoy.MultiPickaxeBase;
+import gtPlusPlus.core.item.tool.staballoy.MultiSpadeBase;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.Material;
@@ -372,7 +373,45 @@ public class UtilsItems {
Utils.rgbtoHexValue(rgb[0],rgb[1],rgb[2])
);
- return MP_Redstone;
+ if (MP_Redstone.isValid){
+ return MP_Redstone;
+ }
+ return null;
+
+ }
+
+ public static MultiSpadeBase generateMultiShovel(boolean GT_Durability, Materials material){
+ ToolMaterial customMaterial = Utils.generateMaterialFromGT(material);
+ Utils.LOG_INFO("Generating a Multi-Shovel out of "+material.name());
+ short[] rgb;
+ rgb = material.getRGBA();
+ int dur = customMaterial.getMaxUses();
+ Utils.LOG_INFO("Determined durability for "+material.name()+" is "+dur);
+ if (GT_Durability){
+ dur = material.mDurability*100;
+ Utils.LOG_INFO("Using gregtech durability value, "+material.name()+" is now "+dur+".");
+ }
+ else if (dur <= 0){
+ dur = material.mDurability;
+ Utils.LOG_INFO("Determined durability too low, "+material.name()+" is now "+dur+" based on the GT material durability.");
+ }
+
+ if (dur <= 0){
+ Utils.LOG_INFO("Still too low, "+material.name()+" will now go unused.");
+ return null;
+ }
+
+ MultiSpadeBase MP_Redstone = new MultiSpadeBase(
+ material.name()+" Multishovel",
+ (customMaterial),
+ dur,
+ Utils.rgbtoHexValue(rgb[0],rgb[1],rgb[2])
+ );
+
+ if (MP_Redstone.isValid){
+ return MP_Redstone;
+ }
+ return null;
}