mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 20:31:30 +01:00
Fix incorrect instanceof call for jumping
This commit is contained in:
parent
8d17d85392
commit
630484273a
@ -339,10 +339,8 @@ public class NMSImpl implements NMSBridge {
|
||||
float f = (float) (attackDamage == null ? 1 : attackDamage.getValue());
|
||||
int i = 0;
|
||||
|
||||
if (target instanceof LivingEntity) {
|
||||
f += EnchantmentHelper.getDamageBonus(handle.getMainHandItem(), target.getMobType());
|
||||
i += EnchantmentHelper.getKnockbackBonus(handle);
|
||||
}
|
||||
f += EnchantmentHelper.getDamageBonus(handle.getMainHandItem(), target.getMobType());
|
||||
i += EnchantmentHelper.getKnockbackBonus(handle);
|
||||
|
||||
boolean flag = target.hurt(DamageSource.mobAttack(handle), f);
|
||||
|
||||
@ -1273,7 +1271,7 @@ public class NMSImpl implements NMSBridge {
|
||||
|
||||
@Override
|
||||
public boolean shouldJump(org.bukkit.entity.Entity entity) {
|
||||
if (JUMP_FIELD == null || !(entity instanceof LivingEntity))
|
||||
if (JUMP_FIELD == null || !(entity instanceof org.bukkit.entity.LivingEntity))
|
||||
return false;
|
||||
try {
|
||||
return (boolean) JUMP_FIELD.invoke(NMSImpl.getHandle(entity));
|
||||
|
Loading…
Reference in New Issue
Block a user