Class FpSyncRegistry
java.lang.Object
com.github.razorplay01.fp_pal.firstperson.FpSyncRegistry
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 TypeMethodDescriptionstatic Map<net.minecraft.resources.Identifier, net.minecraft.resources.Identifier> static net.minecraft.resources.IdentifiergetFpAnimation(net.minecraft.resources.Identifier thirdPersonId) Get the FP animation ID for a given 3rd person animation ID.static net.minecraft.resources.IdentifiergetThirdPersonAnimation(net.minecraft.resources.Identifier fpId) Get the 3rd person animation ID for a given FP animation ID.static booleanhasFpPair(net.minecraft.resources.Identifier thirdPersonId) Check if a 3rd person animation has a paired FP animation.static voidregisterPaired(net.minecraft.resources.Identifier thirdPersonId, net.minecraft.resources.Identifier fpId) Register a paired 3rd person + FP animation.
-
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.
-