diff --git a/src/main/java/com/minelittlepony/unicopia/entity/Living.java b/src/main/java/com/minelittlepony/unicopia/entity/Living.java index 4e10b746..1feb82b4 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/Living.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/Living.java @@ -15,6 +15,7 @@ import com.minelittlepony.unicopia.ability.magic.SpellContainer.Operation; import com.minelittlepony.unicopia.ability.magic.spell.Situation; import com.minelittlepony.unicopia.advancement.UCriteria; import com.minelittlepony.unicopia.block.data.DragonBreathStore; +import com.minelittlepony.unicopia.entity.effect.UEffects; import com.minelittlepony.unicopia.item.GlassesItem; import com.minelittlepony.unicopia.item.UItems; import com.minelittlepony.unicopia.network.datasync.EffectSync; @@ -117,6 +118,11 @@ public abstract class Living implements Equine, Caste landEvent = null; } + if (entity.hasStatusEffect(UEffects.PARALYSIS) && entity.getVelocity().horizontalLengthSquared() > 0) { + entity.setVelocity(entity.getVelocity().multiply(0, 1, 0)); + updateVelocity(); + } + enchants.tick(); prevSneaking = entity.isSneaking(); diff --git a/src/main/java/com/minelittlepony/unicopia/entity/effect/UEffects.java b/src/main/java/com/minelittlepony/unicopia/entity/effect/UEffects.java index 88e67e69..fa191be7 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/effect/UEffects.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/effect/UEffects.java @@ -3,12 +3,14 @@ package com.minelittlepony.unicopia.entity.effect; import com.minelittlepony.unicopia.Unicopia; import net.minecraft.entity.effect.StatusEffect; +import net.minecraft.entity.effect.StatusEffectCategory; import net.minecraft.util.registry.Registry; public interface UEffects { StatusEffect FOOD_POISONING = register("food_poisoning", new FoodPoisoningStatusEffect(3484199)); StatusEffect SUN_BLINDNESS = register("sun_blindness", new SunBlindnessStatusEffect(0x886F0F)); StatusEffect CORRUPT_INFLUENCE = register("corrupt_influence", new CorruptInfluenceStatusEffect(0x00FF00)); + StatusEffect PARALYSIS = register("paralysis", new StatusEffect(StatusEffectCategory.HARMFUL, 0) {}); private static StatusEffect register(String name, StatusEffect effect) { return Registry.register(Registry.STATUS_EFFECT, Unicopia.id(name), effect); diff --git a/src/main/resources/assets/unicopia/lang/en_us.json b/src/main/resources/assets/unicopia/lang/en_us.json index 831b7e95..b6cee30f 100644 --- a/src/main/resources/assets/unicopia/lang/en_us.json +++ b/src/main/resources/assets/unicopia/lang/en_us.json @@ -152,6 +152,7 @@ "player.gravityModifier": "Gravity", "effect.unicopia.sun_blindness": "Sun Blindness", + "effect.unicopia.paralysis": "Paralysis", "effect.unicopia.change_race_earth": "Earth Pony Metamorphosis", "item.minecraft.potion.effect.unicopia.tribe_swap_earth": "Potion of Earth Pony Metamorphosis",