Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDog896 committed Nov 22, 2021
1 parent a58bce9 commit 8019bee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -209,7 +209,7 @@ object CombatHandler {
(target as LivingEntity).damage(DamageType.fromEntity(entity), cepiItem?.get<DamageTrait>()?.damage ?: 1.0f)

// Apply knockback to the entity
target.applyKnockback(entity, cepiItem?.get<KnockbackTrait>()?.amount ?: 1.0f)
target.applyKnockback(entity, cepiItem?.get<KnockbackTrait>()?.amount ?: 0f)

if (entity is EquipmentHandler)
entity.useAttackSpeed((entity as EquipmentHandler).itemInMainHand)
Expand Down
Expand Up @@ -6,7 +6,7 @@ import kotlin.math.cos
import kotlin.math.sin


fun Entity.applyKnockback(attacker: Entity, extra: Float = 1.0f) {
fun Entity.applyKnockback(attacker: Entity, extra: Float = 0f) {
val verticalKnockback = 0.4 * 20
val horizontalKnockback = 0.4 * 20
val extraHorizontalKnockback = 0.3 * 20
Expand Down

0 comments on commit 8019bee

Please sign in to comment.