mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed bat screech effect position when ponified. Fixes #399
This commit is contained in:
parent
3a9f6a6a2b
commit
0207f83236
2 changed files with 7 additions and 2 deletions
|
@ -8,6 +8,7 @@ import com.minelittlepony.unicopia.UTags;
|
|||
import com.minelittlepony.unicopia.ability.data.Numeric;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.effect.SpellType;
|
||||
import com.minelittlepony.unicopia.advancement.UCriteria;
|
||||
import com.minelittlepony.unicopia.client.minelittlepony.MineLPDelegate;
|
||||
import com.minelittlepony.unicopia.client.render.PlayerPoser.Animation;
|
||||
import com.minelittlepony.unicopia.entity.Living;
|
||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||
|
@ -126,8 +127,10 @@ public class ScreechAbility implements Ability<Numeric> {
|
|||
|
||||
@Override
|
||||
public void coolDown(Pony player, AbilitySlot slot) {
|
||||
Vec3d eyePos = player.asEntity().getPos().add(0, MineLPDelegate.getInstance().getPonyHeight(player.asEntity()) * 0.8, 0);
|
||||
|
||||
for (int i = 0; i < 20; i++) {
|
||||
player.addParticle(ParticleTypes.BUBBLE_POP, player.asEntity().getEyePos(),
|
||||
player.addParticle(ParticleTypes.BUBBLE_POP, eyePos,
|
||||
VecHelper.supply(() -> (player.asWorld().getRandom().nextGaussian() - 0.5) * 0.3)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -116,7 +116,9 @@ public class Main extends MineLPDelegate implements ClientModInitializer {
|
|||
|
||||
@Override
|
||||
public float getPonyHeight(Entity entity) {
|
||||
return super.getPonyHeight(entity) * com.minelittlepony.api.pony.Pony.getManager().getPony(entity).map(pony -> pony.metadata().size().scaleFactor() + 0.1F).orElse(1F);
|
||||
return super.getPonyHeight(entity) * com.minelittlepony.api.pony.Pony.getManager().getPony(entity)
|
||||
.map(pony -> pony.race().isHuman() ? 1 : pony.metadata().size().scaleFactor() + 0.1F)
|
||||
.orElse(1F);
|
||||
}
|
||||
|
||||
private static Race toUnicopiaRace(com.minelittlepony.api.pony.meta.Race race) {
|
||||
|
|
Loading…
Reference in a new issue