aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/item/tool
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-04-03 18:14:21 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-04-03 18:14:21 +1000
commit915139115434ff5797df6f82a63578e938864016 (patch)
tree5e8f655e8e9cc8b1af2db2ae3fdbbedfb942ec39 /src/Java/miscutil/core/item/tool
parent6e2d7b787d2338fd6e35532f91e6ff6a48eed682 (diff)
downloadGT5-Unofficial-915139115434ff5797df6f82a63578e938864016.tar.gz
GT5-Unofficial-915139115434ff5797df6f82a63578e938864016.tar.bz2
GT5-Unofficial-915139115434ff5797df6f82a63578e938864016.zip
Finally, Got everything working how I want. Only thing left to do is the anti-grief block.
Fixed Buffer Cores, now there is 10 tiers, all with a unique colour and recipe. Energy Buffers have had their recipes revised, due to new recipes for the cores. Steam condenser may need tweaking, but for now, I'll let it slide and players test it. Updated a few graphics too, the Staballoy Axe and Pickaxe, the Buffer Core and the New Hammer Tool all received visual updates. Compiled build and Dev. build will be up shortly.
Diffstat (limited to 'src/Java/miscutil/core/item/tool')
-rw-r--r--src/Java/miscutil/core/item/tool/Loader_TOOLS.java165
-rw-r--r--src/Java/miscutil/core/item/tool/misc/SandstoneHammer.java63
-rw-r--r--src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java20
-rw-r--r--src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java14
4 files changed, 238 insertions, 24 deletions
diff --git a/src/Java/miscutil/core/item/tool/Loader_TOOLS.java b/src/Java/miscutil/core/item/tool/Loader_TOOLS.java
index c88c39cb35..bd917df75f 100644
--- a/src/Java/miscutil/core/item/tool/Loader_TOOLS.java
+++ b/src/Java/miscutil/core/item/tool/Loader_TOOLS.java
@@ -1,26 +1,177 @@
package miscutil.core.item.tool;
import miscutil.core.item.ModItems;
+import miscutil.core.util.ItemUtils;
+import miscutil.core.util.Utils;
+import net.minecraft.block.Block;
+import net.minecraft.init.Blocks;
+import net.minecraft.init.Items;
import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.oredict.OreDictionary;
public class Loader_TOOLS {
- private static //Tools
- Item RECIPE_StaballoyPickaxe = ModItems.itemStaballoyPickaxe;
+ //Outputs
+ static ItemStack RECIPE_StaballoyPickaxe = new ItemStack(ModItems.itemStaballoyPickaxe);
+ static ItemStack RECIPE_StaballoyAxe = new ItemStack(ModItems.itemStaballoyAxe);
+ static ItemStack RECIPE_SandstoneHammer = new ItemStack(ModItems.itemSandstoneHammer);
+ static ItemStack RECIPE_StaballoyIngot = new ItemStack(ModItems.itemIngotStaballoy);
+ static ItemStack RECIPE_SandStone = new ItemStack(Blocks.sandstone, 2);
+ static ItemStack RECIPE_Sand = new ItemStack(Blocks.sand, 4);
- //Dirt
- //ItemStack dirtStack = new ItemStack(Block.dirt);
+ static ItemStack RECIPE_DivisionSigil = new ItemStack(Utils.getItem("ExtraUtilities:divisionSigil"));
- //Materials
+ //MC Items
+ static Item Apple = Items.apple;
+ //MC Blocks
+ static Block CobbleStone = Blocks.cobblestone;
+ static Block Dirt = Blocks.dirt;
+ static Block Sand = Blocks.sand;
+ static Block Gravel = Blocks.gravel;
+ static Block Sandstone = Blocks.sandstone;
+ //null
+ static String empty = " ";
- public static final void run(){
+ //Batteries
+ static String batteryBasic = "batteryBasic";
+ static String batteryAdvanced = "batteryAdvanced";
+ static String batteryElite = "batteryElite";
+ static String batteryMaster = "batteryMaster";
+ static String batteryUltimate = "batteryUltimate";
+
+ //Circuits
+ static String circuitPrimitive = "circuitPrimitive";
+ static String circuitBasic = "circuitBasic";
+ static String circuitGood = "circuitGood";
+ static String circuitAdvanced = "circuitAdvanced";
+ static String circuitElite = "circuitElite";
+ static String circuitMaster = "circuitMaster";
+ static String circuitUltimate = "circuitUltimate";
+
+ //Cables
+ static String cableGt01Electrum = "cableGt01Electrum";
+ static String cableGt02Electrum = "cableGt02Electrum";
+ static String cableGt01RedstoneAlloy = "cableGt01RedstoneAlloy";
+ static String cableGt02RedstoneAlloy = "cableGt02RedstoneAlloy";
+ static String cableGt01Copper = "cableGt01Copper";
+ static String cableGt02Copper = "cableGt02Copper";
+ static String cableGt01AnnealedCopper = "cableGt01AnnealedCopper";
+ static String cableGt02AnnealedCopper = "cableGt02AnnealedCopper";
+
+ //Rods
+ static String stickStaballoy= "stickStaballoy";
+ static String stickTitanium= "stickTitanium";
+ static String stickIron= "stickIron";
+ static String stickGold= "stickGold";
+ static String stickSilver= "stickSilver";
+ static String stickSteel= "stickSteel";
+ static String stickBronze= "stickBronze";
+ static String stickTungsten= "stickTungsten";
+ static String stickRedAlloy= "stickRedAlloy";
+ static String stickInvar= "stickInvar";
+ static String stickElectrum= "stickElectrum";
+ static String stickElectricalSteel= "stickElectricalSteel";
+
+ //Plates
+ static String plateStaballoy= "plateStaballoy";
+ static String plateTitanium= "plateTitanium";
+ static String plateIron= "plateIron";
+ static String plateGold= "plateGold";
+ static String plateSilver= "plateSilver";
+ static String plateSteel= "plateSteel";
+ static String plateBronze= "plateBronze";
+ static String plateTungsten= "plateTungsten";
+ static String plateRedAlloy= "plateRedAlloy";
+ static String plateInvar= "plateInvar";
+ static String plateElectrum= "plateElectrum";
+ static String plateElectricalSteel= "plateElectricalSteel";
+
+ //Ingots
+ static String ingotStaballoy= "ingotStaballoy";
+ static String ingotTitanium= "ingotTitanium";
+ static String ingotIron= "ingotIron";
+ static String ingotGold= "ingotGold";
+ static String ingotSilver= "ingotSilver";
+ static String ingotSteel= "ingotSteel";
+ static String ingotBronze= "ingotBronze";
+ static String ingotTungsten= "ingotTungsten";
+ static String ingotRedAlloy= "ingotRedAlloy";
+ static String ingotInvar= "ingotInvar";
+ static String ingotElectrum= "ingotElectrum";
+ static String ingotUranium= "ingotUranium";
+ static String ingotElectricalSteel= "ingotElectricalSteel";
+
+ //Crafting Tools
+ static String craftingToolHardHammer = "craftingToolHardHammer";
+ static String craftingToolSoftHammer = "craftingToolSoftHammer";
+ static String craftingToolFile = "craftingToolFile";
+ static String craftingToolSaw = "craftingToolSaw";
+ static String craftingToolPickaxe = "craftingToolPickaxe";
+ static String craftingToolWrench = "craftingToolWrench";
+ static String craftingToolCrowbar = "craftingToolCrowbar";
+ static String craftingToolKnife = "craftingToolKnife";
+ static String craftingToolScrewdriver = "craftingToolScrewdriver";
+
+ static ItemStack sandHammer = new ItemStack (ModItems.itemSandstoneHammer, 1, OreDictionary.WILDCARD_VALUE);
+ static String craftingToolSandHammer = "craftingToolSandHammer";
+
+ public static final void run(){
+
+ //plateStaballoy = new ItemStack(ModItems.itemPlateStaballoy);
+ //ingotStaballoy = new ItemStack(ModItems.itemIngotStaballoy);
+
+ //Pickaxes
+ registerPickaxes();
}
private static void registerPickaxes(){
- //Utils.recipeBuilderItem("plateStaballoy", "plateStaballoy", "ingotStaballoy", null, "plateStaballoy", null, null, null, null, RECIPE_StaballoyPickaxe);
+ //Staballoy Pickaxe
+ ItemUtils.recipeBuilder(
+ plateStaballoy, plateStaballoy, ingotStaballoy,
+ craftingToolFile, stickTungsten, craftingToolHardHammer,
+ craftingToolWrench, stickTungsten, craftingToolHardHammer,
+ RECIPE_StaballoyPickaxe);
+
+ //Staballoy Axe
+ ItemUtils.recipeBuilder(
+ plateStaballoy, ingotStaballoy, craftingToolHardHammer,
+ plateStaballoy, stickTungsten, craftingToolHardHammer,
+ craftingToolFile, stickTungsten, craftingToolWrench,
+ RECIPE_StaballoyAxe);
+
+ //Cobble to Sand
+ ItemUtils.recipeBuilder(
+ CobbleStone, CobbleStone, CobbleStone,
+ CobbleStone, sandHammer, CobbleStone,
+ CobbleStone, CobbleStone, CobbleStone,
+ RECIPE_Sand);
+
+ //Sand to Sandstone
+ ItemUtils.recipeBuilder(
+ Sand, Sand, Sand,
+ Sand, sandHammer, Sand,
+ Sand, Sand, Sand,
+ RECIPE_SandStone);
+
+ //Sandstone Hammer
+ ItemUtils.recipeBuilder(
+ plateElectrum, ingotElectrum, plateElectrum,
+ craftingToolScrewdriver, stickBronze, craftingToolHardHammer,
+ null, stickSteel, null,
+ RECIPE_SandstoneHammer);
+
+ //Division Sigil
+ ItemUtils.recipeBuilder(
+ "plateNetherStar", "gemIridium", "plateNetherStar",
+ "plateIridium", craftingToolHardHammer, "plateIridium",
+ "plateNetherStar", "gemIridium", "plateNetherStar",
+ RECIPE_DivisionSigil);
+
+
}
}
diff --git a/src/Java/miscutil/core/item/tool/misc/SandstoneHammer.java b/src/Java/miscutil/core/item/tool/misc/SandstoneHammer.java
new file mode 100644
index 0000000000..6f4f40aed5
--- /dev/null
+++ b/src/Java/miscutil/core/item/tool/misc/SandstoneHammer.java
@@ -0,0 +1,63 @@
+package miscutil.core.item.tool.misc;
+
+import java.util.List;
+
+import miscutil.core.item.base.BaseItemWithDamageValue;
+import miscutil.core.lib.CORE;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+
+public class SandstoneHammer extends BaseItemWithDamageValue{
+
+ /* (non-Javadoc)
+ * @see net.minecraft.item.Item#getColorFromItemStack(net.minecraft.item.ItemStack, int)
+ */
+ @Override
+ public int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF) {
+ //Figure Out Damage
+
+
+ return super.getColorFromItemStack(stack, HEX_OxFFFFFF);
+ }
+
+ public SandstoneHammer(String unlocalizedName) {
+ super(unlocalizedName);
+ this.setTextureName(CORE.MODID + ":" + unlocalizedName);
+ this.setMaxStackSize(1);
+ this.setMaxDamage(2500);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) {
+ list.add(EnumChatFormatting.GRAY+"Allows you to craft sand from cobble, or sandstone from sand.");
+ super.addInformation(stack, aPlayer, list, bool);
+ }
+
+ @Override
+ public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean getShareTag()
+ {
+ return true;
+ }
+
+ @Override
+ public boolean hasContainerItem(ItemStack itemStack)
+ {
+ return true;
+ }
+ @Override
+ public ItemStack getContainerItem(ItemStack itemStack)
+ {
+ itemStack.setItemDamage(itemStack.getItemDamage() + 8);
+
+ return itemStack;
+ }
+
+}
diff --git a/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java b/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java
index 64ed49f80c..9637787e93 100644
--- a/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java
+++ b/src/Java/miscutil/core/item/tool/staballoy/StaballoyAxe.java
@@ -1,5 +1,7 @@
package miscutil.core.item.tool.staballoy;
+import java.util.List;
+
import miscutil.core.lib.CORE;
import net.minecraft.block.Block;
import net.minecraft.block.BlockAir;
@@ -17,24 +19,22 @@ import net.minecraft.block.BlockSnow;
import net.minecraft.block.BlockSnowBlock;
import net.minecraft.block.BlockTallGrass;
import net.minecraft.block.BlockVine;
-import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
public class StaballoyAxe extends ItemAxe{
public String mat;
- public StaballoyAxe(ToolMaterial material, String materialName) {
+ public StaballoyAxe(String unlocalizedName, ToolMaterial material) {
super(material);
- mat=materialName;
- setCreativeTab(CreativeTabs.tabTools);
- setUnlocalizedName("lumberaxe"+mat);
- setTextureName(CORE.MODID+":lumberaxe_"+mat);
+ this.setUnlocalizedName(unlocalizedName);
+ this.setTextureName(CORE.MODID + ":" + unlocalizedName);
}
// EXPLODE TREE
@@ -51,6 +51,14 @@ public class StaballoyAxe extends ItemAxe{
return true;
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @Override
+ public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) {
+ list.add(EnumChatFormatting.GOLD+"Fells entire trees in a single swipe!..");
+ list.add(EnumChatFormatting.GRAY+"Ask Alkalus for new trees to be supported.");
+ super.addInformation(stack, aPlayer, list, bool);
+ }
+
public boolean canIgnore(Block bit){
if (bit instanceof BlockAir)return true;
if (bit instanceof BlockGrass)return true;
diff --git a/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java b/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java
index 7e5db8691d..0eee4cd165 100644
--- a/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java
+++ b/src/Java/miscutil/core/item/tool/staballoy/StaballoyPickaxe.java
@@ -68,6 +68,7 @@ public class StaballoyPickaxe extends ItemPickaxe{
return super.onBlockDestroyed(stack, world, block, X, Y, Z, entity);
}
+ @SuppressWarnings("static-method")
private float calculateDurabilityLoss(World world, int X, int Y, int Z){
float bDurabilityLoss = 0;
Boolean correctTool = false;
@@ -173,7 +174,6 @@ public class StaballoyPickaxe extends ItemPickaxe{
}
//Should clear up blocks quicker if I chain it.
- @SuppressWarnings("static-method")
private void removeBlockAndDropAsItem(World world, int X, int Y, int Z, ItemStack heldItem){
localWorld = world;
try {
@@ -273,16 +273,8 @@ public class StaballoyPickaxe extends ItemPickaxe{
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) {
- String facing;
- thisPickaxe = stack;
-
- if (FACING_HORIZONTAL){
- facing = "Horizontal";
- }
- else {
- facing = "Vertical";
- }
- list.add(EnumChatFormatting.GOLD+"Mines a 3x3 area on an axis. Currently Facing:"+facing);
+ thisPickaxe = stack;
+ list.add(EnumChatFormatting.GOLD+"Mines a 3x3 area in the direction you are facing.");
super.addInformation(stack, aPlayer, list, bool);
}