diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/ChickenBehaviour.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/ChickenBehaviour.java new file mode 100644 index 00000000..78f65439 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/ChickenBehaviour.java @@ -0,0 +1,19 @@ +package com.minelittlepony.unicopia.entity.behaviour; + +import com.minelittlepony.unicopia.ability.magic.Caster; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.passive.ChickenEntity; +import net.minecraft.util.math.Vec3d; + +public class ChickenBehaviour extends EntityBehaviour { + @Override + public void update(Caster source, ChickenEntity entity) { + Entity src = source.getEntity(); + Vec3d vel = src.getVelocity(); + + if (!src.isOnGround() && vel.y < 0) { + src.setVelocity(vel.multiply(1, 0.6, 1)); + } + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java index e999915d..e839b462 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/EntityBehaviour.java @@ -39,6 +39,7 @@ public abstract class EntityBehaviour { static { register(ShulkerBehaviour::new, EntityType.SHULKER); register(CreeperBehaviour::new, EntityType.CREEPER); + register(ChickenBehaviour::new, EntityType.CHICKEN); register(MinecartBehaviour::new, EntityType.CHEST_MINECART, EntityType.COMMAND_BLOCK_MINECART, EntityType.FURNACE_MINECART, EntityType.HOPPER_MINECART, EntityType.MINECART, EntityType.SPAWNER_MINECART, EntityType.TNT_MINECART); } }