mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Pegasi cannot pick up special entities
This commit is contained in:
parent
bee6d39a96
commit
1f05e46648
1 changed files with 2 additions and 5 deletions
|
@ -5,6 +5,7 @@ import java.util.Optional;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.stream.StreamSupport;
|
import java.util.stream.StreamSupport;
|
||||||
|
|
||||||
|
import com.minelittlepony.unicopia.EquinePredicates;
|
||||||
import com.minelittlepony.unicopia.Race;
|
import com.minelittlepony.unicopia.Race;
|
||||||
import com.minelittlepony.unicopia.ability.data.Hit;
|
import com.minelittlepony.unicopia.ability.data.Hit;
|
||||||
import com.minelittlepony.unicopia.entity.Living;
|
import com.minelittlepony.unicopia.entity.Living;
|
||||||
|
@ -48,7 +49,7 @@ public class CarryAbility implements Ability<Hit> {
|
||||||
|
|
||||||
protected LivingEntity findRider(PlayerEntity player, World w) {
|
protected LivingEntity findRider(PlayerEntity player, World w) {
|
||||||
return TraceHelper.<LivingEntity>findEntity(player, 10, 1, hit -> {
|
return TraceHelper.<LivingEntity>findEntity(player, 10, 1, hit -> {
|
||||||
return hit instanceof LivingEntity && !player.isConnectedThroughVehicle(hit) && !(hit instanceof IPickupImmuned);
|
return EquinePredicates.EXCEPT_MAGIC_IMMUNE.test(hit) && !player.isConnectedThroughVehicle(hit);
|
||||||
}).orElse(null);
|
}).orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,8 +102,4 @@ public class CarryAbility implements Ability<Hit> {
|
||||||
@Override
|
@Override
|
||||||
public void coolDown(Pony player, AbilitySlot slot) {
|
public void coolDown(Pony player, AbilitySlot slot) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IPickupImmuned {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue