Class FpSyncRegistry

java.lang.Object
com.github.razorplay01.fp_pal.firstperson.FpSyncRegistry

public class FpSyncRegistry extends Object
Registry for synchronizing 3rd person animations with first-person animations. Maps 3rd person animation IDs to their FP counterparts. Example: "player_animation_library:reload" -> "player_animation_library:fp_reload"
  • Method Summary

    Modifier and Type
    Method
    Description
    static Map<net.minecraft.resources.Identifier, net.minecraft.resources.Identifier>
     
    static net.minecraft.resources.Identifier
    getFpAnimation(net.minecraft.resources.Identifier thirdPersonId)
    Get the FP animation ID for a given 3rd person animation ID.
    static net.minecraft.resources.Identifier
    getThirdPersonAnimation(net.minecraft.resources.Identifier fpId)
    Get the 3rd person animation ID for a given FP animation ID.
    static boolean
    hasFpPair(net.minecraft.resources.Identifier thirdPersonId)
    Check if a 3rd person animation has a paired FP animation.
    static void
    registerPaired(net.minecraft.resources.Identifier thirdPersonId, net.minecraft.resources.Identifier fpId)
    Register a paired 3rd person + FP animation.

    Methods inherited from class Object

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

    • registerPaired

      public static void registerPaired(net.minecraft.resources.Identifier thirdPersonId, net.minecraft.resources.Identifier fpId)
      Register a paired 3rd person + FP animation.
    • getFpAnimation

      @Nullable public static net.minecraft.resources.Identifier getFpAnimation(net.minecraft.resources.Identifier thirdPersonId)
      Get the FP animation ID for a given 3rd person animation ID.
      Returns:
      the FP animation ID, or null if no pairing exists.
    • getThirdPersonAnimation

      @Nullable public static net.minecraft.resources.Identifier getThirdPersonAnimation(net.minecraft.resources.Identifier fpId)
      Get the 3rd person animation ID for a given FP animation ID.
      Returns:
      the 3rd person animation ID, or null if no pairing exists.
    • hasFpPair

      public static boolean hasFpPair(net.minecraft.resources.Identifier thirdPersonId)
      Check if a 3rd person animation has a paired FP animation.
    • getAllPairs

      public static Map<net.minecraft.resources.Identifier, net.minecraft.resources.Identifier> getAllPairs()
      Returns:
      all registered pairings.