mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Move DualHarvest speed calc also into AbilityHelper
This commit is contained in:
1 parent
5495722194
commit
e6469587fe
2 files changed
+20
-20
No files matched your search
@@ -699,6 +699,22 @@ public class AbilityHelper
|
||||
return trueSpeed;
|
||||
}
|
||||
|
||||
public static float calcDualToolSpeed (ToolCore tool, NBTTagCompound tags, boolean secondary)
|
||||
{
|
||||
String tag = "MiningSpeed";
|
||||
if(secondary) tag += "2";
|
||||
|
||||
float mineSpeed = tags.getInteger(tag);
|
||||
float speedMod = 1f;
|
||||
if (tool instanceof HarvestTool)
|
||||
speedMod = ((HarvestTool) tool).breakSpeedModifier();
|
||||
|
||||
float trueSpeed = mineSpeed / 100f * speedMod;
|
||||
trueSpeed += calcStoneboundBonus(tool, tags);
|
||||
|
||||
return trueSpeed;
|
||||
}
|
||||
|
||||
public static float calcStoneboundBonus (ToolCore tool, NBTTagCompound tags)
|
||||
{
|
||||
int durability = tags.getInteger("Damage");
|
||||
|
||||
Reference in new issue
Block a user