Fix zapping non androids
This commit is contained in:
parent
2833d1fdb9
commit
64403858f3
@ -89,8 +89,10 @@ class EnergySwordItem : Item(Properties().stacksTo(1).rarity(Rarity.RARE).tab(Ov
|
||||
itemStack.getCapability(MatteryCapability.ENERGY).ifPresentK {
|
||||
if (!it.extractEnergyInnerExact(ENERGY_PER_SWING, false).isZero) {
|
||||
victim.matteryPlayer?.let {
|
||||
it.androidEnergy.extractEnergyInner(ENERGY_ZAP, false)
|
||||
victim.hurt(EMPDamageSource(attacker), 8f)
|
||||
if (it.isAndroid) {
|
||||
it.androidEnergy.extractEnergyInner(ENERGY_ZAP, false)
|
||||
victim.hurt(EMPDamageSource(attacker), 8f)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user