mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 15:03:01 +00:00
Throwing knives now crit when they're aimed long enough
This commit is contained in:
1 parent
d57f8b64a8
commit
40a2e91943
4 files changed
+12
-6
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package tconstruct.weaponry.weapons;
|
||||
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import tconstruct.library.entity.ProjectileBase;
|
||||
import tconstruct.weaponry.client.CrosshairType;
|
||||
import tconstruct.weaponry.entity.ThrowingKnifeEntity;
|
||||
import tconstruct.library.weaponry.AmmoWeapon;
|
||||
@@ -77,8 +78,13 @@ public class ThrowingKnife extends AmmoWeapon {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Entity createProjectile(ItemStack reference, World world, EntityPlayer player, float accuracy) {
|
||||
return new ThrowingKnifeEntity(world, player, getProjectileSpeed(), accuracy, reference);
|
||||
protected Entity createProjectile(ItemStack reference, World world, EntityPlayer player, float accuracy, int time) {
|
||||
ProjectileBase knife = new ThrowingKnifeEntity(world, player, getProjectileSpeed(), accuracy, reference);
|
||||
// if you aim long enough, it's a crit!
|
||||
if(time >= this.getWindupTime(reference)*1.5f)
|
||||
knife.setIsCritical(true);
|
||||
|
||||
return knife;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user