Class SpiritJump

java.lang.Object
etithespirit.orimod.spirit.client.SpiritJump

public final class SpiritJump extends Object
Manages all behaviors pertaining to how spirits jump.
Author:
Eti
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.client.KeyMapping
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    onEntityJumped(net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent event)
     
    static void
    onKeyPressed(net.minecraftforge.client.event.MovementInputUpdateEvent evt)
     
    static void
    onPlayerTicked(net.minecraftforge.event.TickEvent.PlayerTickEvent evt)
     
    static void
    performJump(net.minecraft.client.player.LocalPlayer player, float up, net.minecraft.core.BlockPos wallPos, boolean isWallJump)
    Emulates jumping with the given upward force, changing the sound based on isWallJump.
    static boolean
    performWallJump(net.minecraft.client.player.LocalPlayer player)
    New wall jump behavior derived from the Wall Jump mod.
    static void
    tryPerformWallCling(net.minecraft.world.entity.player.Player player)
    Attempts to cling to a wall, which reduces Y velocity quickly over time.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CLING_BIND

      public static final net.minecraft.client.KeyMapping CLING_BIND
  • Constructor Details

    • SpiritJump

      public SpiritJump()
  • Method Details

    • performWallJump

      public static boolean performWallJump(net.minecraft.client.player.LocalPlayer player)
      New wall jump behavior derived from the Wall Jump mod. Returns whether or not a wall jump was actually performed. Generally speaking, if this returns false, PerformMultiJump should be called instead.
      Parameters:
      player - The player to perform with.
      Returns:
      Whether or not the wall jump was actually performed.
    • tryPerformWallCling

      public static void tryPerformWallCling(net.minecraft.world.entity.player.Player player)
      Attempts to cling to a wall, which reduces Y velocity quickly over time. As such, this should be called in a ticker.
      Parameters:
      player - The player who is doing this.
    • performJump

      public static void performJump(net.minecraft.client.player.LocalPlayer player, float up, @Nullable net.minecraft.core.BlockPos wallPos, boolean isWallJump)
      Emulates jumping with the given upward force, changing the sound based on isWallJump. If isWallJump is false, this increments CurrentJumps.
      Parameters:
      player - The player who is jumping.
      up - The upward force.
      isWallJump - Whether or not this jump was prompted by a wall jump.
    • onKeyPressed

      public static void onKeyPressed(net.minecraftforge.client.event.MovementInputUpdateEvent evt)
    • onPlayerTicked

      public static void onPlayerTicked(net.minecraftforge.event.TickEvent.PlayerTickEvent evt)
    • onEntityJumped

      public static void onEntityJumped(net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent event)