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
1b2f0ebd6b
commit
512ae4d126
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.data.Numeric;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.effect.SpellType;
|
import com.minelittlepony.unicopia.ability.magic.spell.effect.SpellType;
|
||||||
import com.minelittlepony.unicopia.advancement.UCriteria;
|
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.client.render.PlayerPoser.Animation;
|
||||||
import com.minelittlepony.unicopia.entity.Living;
|
import com.minelittlepony.unicopia.entity.Living;
|
||||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||||
|
@ -126,8 +127,10 @@ public class ScreechAbility implements Ability<Numeric> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void coolDown(Pony player, AbilitySlot slot) {
|
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++) {
|
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)
|
VecHelper.supply(() -> (player.asWorld().getRandom().nextGaussian() - 0.5) * 0.3)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,9 @@ public class Main extends MineLPDelegate implements ClientModInitializer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getPonyHeight(Entity entity) {
|
public float getPonyHeight(Entity entity) {
|
||||||
return super.getPonyHeight(entity) * IPony.getManager().getPony(entity).map(pony -> pony.metadata().getSize().getScaleFactor() + 0.1F).orElse(1F);
|
return super.getPonyHeight(entity) * IPony.getManager().getPony(entity)
|
||||||
|
.map(pony -> pony.race().isHuman() ? 1 : pony.metadata().getSize().getScaleFactor() + 0.1F)
|
||||||
|
.orElse(1F);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Race toUnicopiaRace(com.minelittlepony.api.pony.meta.Race race) {
|
private static Race toUnicopiaRace(com.minelittlepony.api.pony.meta.Race race) {
|
||||||
|
|
Loading…
Reference in a new issue