mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Added paralysis status effect
This commit is contained in:
parent
ca825b9c32
commit
fd7848e8e5
3 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,7 @@ import com.minelittlepony.unicopia.ability.magic.SpellContainer.Operation;
|
||||||
import com.minelittlepony.unicopia.ability.magic.spell.Situation;
|
import com.minelittlepony.unicopia.ability.magic.spell.Situation;
|
||||||
import com.minelittlepony.unicopia.advancement.UCriteria;
|
import com.minelittlepony.unicopia.advancement.UCriteria;
|
||||||
import com.minelittlepony.unicopia.block.data.DragonBreathStore;
|
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.GlassesItem;
|
||||||
import com.minelittlepony.unicopia.item.UItems;
|
import com.minelittlepony.unicopia.item.UItems;
|
||||||
import com.minelittlepony.unicopia.network.datasync.EffectSync;
|
import com.minelittlepony.unicopia.network.datasync.EffectSync;
|
||||||
|
@ -117,6 +118,11 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
||||||
landEvent = null;
|
landEvent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (entity.hasStatusEffect(UEffects.PARALYSIS) && entity.getVelocity().horizontalLengthSquared() > 0) {
|
||||||
|
entity.setVelocity(entity.getVelocity().multiply(0, 1, 0));
|
||||||
|
updateVelocity();
|
||||||
|
}
|
||||||
|
|
||||||
enchants.tick();
|
enchants.tick();
|
||||||
|
|
||||||
prevSneaking = entity.isSneaking();
|
prevSneaking = entity.isSneaking();
|
||||||
|
|
|
@ -3,12 +3,14 @@ package com.minelittlepony.unicopia.entity.effect;
|
||||||
import com.minelittlepony.unicopia.Unicopia;
|
import com.minelittlepony.unicopia.Unicopia;
|
||||||
|
|
||||||
import net.minecraft.entity.effect.StatusEffect;
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
|
|
||||||
public interface UEffects {
|
public interface UEffects {
|
||||||
StatusEffect FOOD_POISONING = register("food_poisoning", new FoodPoisoningStatusEffect(3484199));
|
StatusEffect FOOD_POISONING = register("food_poisoning", new FoodPoisoningStatusEffect(3484199));
|
||||||
StatusEffect SUN_BLINDNESS = register("sun_blindness", new SunBlindnessStatusEffect(0x886F0F));
|
StatusEffect SUN_BLINDNESS = register("sun_blindness", new SunBlindnessStatusEffect(0x886F0F));
|
||||||
StatusEffect CORRUPT_INFLUENCE = register("corrupt_influence", new CorruptInfluenceStatusEffect(0x00FF00));
|
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) {
|
private static StatusEffect register(String name, StatusEffect effect) {
|
||||||
return Registry.register(Registry.STATUS_EFFECT, Unicopia.id(name), effect);
|
return Registry.register(Registry.STATUS_EFFECT, Unicopia.id(name), effect);
|
||||||
|
|
|
@ -152,6 +152,7 @@
|
||||||
"player.gravityModifier": "Gravity",
|
"player.gravityModifier": "Gravity",
|
||||||
|
|
||||||
"effect.unicopia.sun_blindness": "Sun Blindness",
|
"effect.unicopia.sun_blindness": "Sun Blindness",
|
||||||
|
"effect.unicopia.paralysis": "Paralysis",
|
||||||
|
|
||||||
"effect.unicopia.change_race_earth": "Earth Pony Metamorphosis",
|
"effect.unicopia.change_race_earth": "Earth Pony Metamorphosis",
|
||||||
"item.minecraft.potion.effect.unicopia.tribe_swap_earth": "Potion of Earth Pony Metamorphosis",
|
"item.minecraft.potion.effect.unicopia.tribe_swap_earth": "Potion of Earth Pony Metamorphosis",
|
||||||
|
|
Loading…
Reference in a new issue