mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 11:36:43 +01:00
Fixed gravity boots not working with disguises correctly
This commit is contained in:
parent
b6302ecf15
commit
6cda15c0d7
2 changed files with 7 additions and 0 deletions
|
@ -114,6 +114,7 @@ public class EntityPhysics<T extends Owned<? extends Entity>> implements Physics
|
|||
// Will have the default (1) here in any case, so it's safe to ignore the attribute at this point.
|
||||
return getBaseGravityModifier();
|
||||
}
|
||||
|
||||
return getBaseGravityModifier() * (float)((LivingEntity)master).getAttributeValue(PlayerAttributes.ENTITY_GRAVTY_MODIFIER);
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import com.minelittlepony.unicopia.InteractionManager;
|
|||
import com.minelittlepony.unicopia.Owned;
|
||||
import com.minelittlepony.unicopia.ability.magic.Caster;
|
||||
import com.minelittlepony.unicopia.ability.magic.spell.DisguiseSpell;
|
||||
import com.minelittlepony.unicopia.entity.player.PlayerAttributes;
|
||||
import com.minelittlepony.unicopia.entity.player.Pony;
|
||||
import com.minelittlepony.unicopia.projectile.ProjectileUtil;
|
||||
import com.minelittlepony.unicopia.util.NbtSerialisable;
|
||||
|
@ -28,6 +29,7 @@ import net.minecraft.entity.EntityDimensions;
|
|||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.FallingBlockEntity;
|
||||
import net.minecraft.entity.Flutterer;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.entity.boss.dragon.EnderDragonEntity;
|
||||
import net.minecraft.entity.decoration.AbstractDecorationEntity;
|
||||
import net.minecraft.entity.mob.AmbientEntity;
|
||||
|
@ -172,6 +174,10 @@ public class Disguise implements NbtSerialisable {
|
|||
|
||||
Caster.of(entity).ifPresent(c -> c.setSpell(null));
|
||||
|
||||
if (entity instanceof LivingEntity) {
|
||||
((LivingEntity) entity).getAttributeInstance(PlayerAttributes.ENTITY_GRAVTY_MODIFIER).clearModifiers();
|
||||
}
|
||||
|
||||
if (source.isClient()) {
|
||||
source.getWorld().spawnEntity(entity);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue