mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Drop carried entities switching to a species that's not supposed to be able to carry other entities
This commit is contained in:
parent
67a7c9f16e
commit
fc14f51859
1 changed files with 8 additions and 0 deletions
|
@ -165,6 +165,14 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
|||
}
|
||||
|
||||
|
||||
if (isBeingCarried()) {
|
||||
Pony carrier = Pony.of(entity.getVehicle()).orElse(null);
|
||||
if (!carrier.getCompositeRace().any(Abilities.CARRY::canUse)) {
|
||||
entity.stopRiding();
|
||||
entity.refreshPositionAfterTeleport(carrier.getOriginVector());
|
||||
Living.transmitPassengers(carrier.asEntity());
|
||||
}
|
||||
}
|
||||
|
||||
updateDragonBreath();
|
||||
|
||||
|
|
Loading…
Reference in a new issue