Levitation

Levitation is a potion effect added by Et Futurum Requiem, primarily used by Shulker enemies. It causes affected entities to float upward.

Properties

Property Value
ID 27 (configurable)
Potion Type Potion (extends ModPotions)
Is Bad Effect Yes
Default Color 0xFFFFFF (white)
Has Packet Yes (synchronized to nearby clients)
Always Active isReady() always returns true

Duration & Amplifier

The effect is perpetual once applied — isReady(int duration, int amplifier) always returns true, meaning the potion never expires on its own tick cycle. The effect must be removed programmatically (e.g., by Shulker AI when it attacks again, or by drinking milk).

Amplifier level N affects the upward velocity calculation as level + 1, so:

  • Amplifier 0: velocity factor 0.05 × 1 = 0.05
  • Amplifier 1: velocity factor 0.05 × 2 = 0.10
  • Amplifier N: velocity factor 0.05 × (N + 1)

Effect Behaviour

performEffect(EntityLivingBase entity, int level) applies the following each tick:

  1. Fall distance reset: entity.fallDistance = 0 — completely negates fall damage
  2. Upward velocity injection: entity.addVelocity(0, (0.05 × (level + 1) − entity.motionY) × 0.2, 0) — pushes the entity upward, with the injected velocity proportional to the amplifier level, diminishing as the entity’s existing upward velocity approaches the target
  3. Counter-fall: entity.motionY += 0.08 — applied only when the entity is not in water and not in lava; further counters any downward motion

The effect does not apply to players who are flying in creative or spectator mode (((EntityPlayer) entity).capabilities.isFlying).

Packet Synchronisation

Levitation requires client-side awareness to prevent jittering and desync. hasPacket() returns true, meaning the server sends an S1DPacketEntityEffect packet to all clients tracking the affected entity within 80 blocks, ensuring the client knows the effect is active and can render the floating animation correctly.

Shulker Association

Levitation is the effect used by Shulker enemies when they fire their projectile attack. It is tied to ConfigEntities.enableShulker — if Shulkers are disabled, the potion is not registered. The Shulker applies the effect for a duration managed by its AI, then removes it to allow the player to fall.

Configuration

ID configurable via ConfigEnchantsPotions.levitationID (default 27). No separate enable flag — gated behind ConfigEntities.enableShulker.