mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 04:32:26 +00:00
Shortbows
This commit is contained in:
1 parent
8313a49548
commit
b40106b3e9
288 files changed
+2497
-758
No files matched your search
@@ -49,9 +49,10 @@ public class ModRedstone extends ToolMod
|
||||
public void modify (ItemStack[] input, ItemStack tool)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int[] keyPair;
|
||||
if (tags.hasKey(key))
|
||||
{
|
||||
int[] keyPair = tags.getIntArray(key);
|
||||
keyPair = tags.getIntArray(key);
|
||||
if (keyPair[0] % max == 0)
|
||||
{
|
||||
keyPair[0] += increase;
|
||||
@@ -76,7 +77,7 @@ public class ModRedstone extends ToolMod
|
||||
tags.setInteger("Modifiers", modifiers);
|
||||
String modName = "\u00a74Redstone ("+increase+"/"+max+")";
|
||||
int tooltipIndex = addToolTip(tool, tooltipName, modName);
|
||||
int[] keyPair = new int[] { increase, max, tooltipIndex };
|
||||
keyPair = new int[] { increase, max, tooltipIndex };
|
||||
tags.setIntArray(key, keyPair);
|
||||
}
|
||||
|
||||
@@ -90,6 +91,14 @@ public class ModRedstone extends ToolMod
|
||||
miningSpeed2 += (increase*8);
|
||||
tags.setInteger("MiningSpeed2", miningSpeed2);
|
||||
}
|
||||
|
||||
if (tags.hasKey("DrawSpeed"))
|
||||
{
|
||||
//int drawSpeed = tags.getInteger("DrawSpeed");
|
||||
int baseDrawSpeed = tags.getInteger("BaseDrawSpeed");
|
||||
int drawSpeed = (int) (baseDrawSpeed - (0.1f * baseDrawSpeed * (keyPair[0] / 50f) ));
|
||||
tags.setInteger("DrawSpeed", drawSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
void updateModTag(ItemStack tool, int[] keys)
|
||||
@@ -103,6 +112,6 @@ public class ModRedstone extends ToolMod
|
||||
public boolean validType(ToolCore tool)
|
||||
{
|
||||
List list = Arrays.asList(tool.toolCategories());
|
||||
return list.contains("harvest") || list.contains("utility");
|
||||
return list.contains("harvest") || list.contains("utility") || list.contains("bow");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user