77
88import com .illposed .osc .OSCPacket ;
99import com .provismet .vmcmc .ClientVMC ;
10+ import com .provismet .vmcmc .config .Config ;
1011import com .provismet .vmcmc .utility .HealthTracker ;
1112
1213import net .fabricmc .api .EnvType ;
@@ -33,28 +34,28 @@ public class CaptureRegistry {
3334 private static final HashMap <String , BlendStore > BLENDSTORE_REGISTRY = new HashMap <>();
3435
3536 public static BlendStore getBlendStore (Identifier identifier ) {
36- return BLENDSTORE_REGISTRY .get (identifier . toString ( ));
37+ return BLENDSTORE_REGISTRY .get (Config . getBlendName ( identifier ));
3738 }
3839
3940 public static boolean containsKey (String key ) {
4041 return BLEND_REGISTRY .containsKey (key ) || BLENDSTORE_REGISTRY .containsKey (key ) || BONE_REGISTRY .containsKey (key );
4142 }
4243
4344 public static boolean containsKey (Identifier key ) {
44- return containsKey (key . toString ( ));
45+ return containsKey (Config . getBlendName ( key ));
4546 }
4647
4748 /**
4849 * Registers a callback that generates a BlendShape. Minecraft identifiers are used to softly-enforce unique names.
49- *
50- * It is recommend , but not required, that callbacks have their output bound between 0 and 1.
50+ * <p>
51+ * It is recommended , but not required, that callbacks have their output bound between 0 and 1.
5152 *
5253 * @param identifier The ID for the BlendShape. Note: This will be converted into a string when being sent over OSC.
5354 * @param callback A function that uses the client to output a float.
5455 */
5556 public static void registerBlendShape (Identifier identifier , Function <MinecraftClient , Float > callback ) {
56- if (containsKey (identifier )) ClientVMC .LOGGER .error ("Duplicate BlendShape register attempt: " + identifier . toString ( ));
57- else BLEND_REGISTRY .put (identifier . toString ( ), callback );
57+ if (containsKey (identifier )) ClientVMC .LOGGER .error ("Duplicate BlendShape register attempt: " + Config . getBlendName ( identifier ));
58+ else BLEND_REGISTRY .put (Config . getBlendName ( identifier ), callback );
5859 }
5960
6061 /**
@@ -72,21 +73,21 @@ public static void registerBlendShape (String path, Function<MinecraftClient, Fl
7273 * @param blendStore The BlendStore to receive input from.
7374 */
7475 public static void registerBlendStore (Identifier identifier , BlendStore blendStore ) {
75- if (containsKey (identifier )) ClientVMC .LOGGER .error ("Duplicate BlendStore register attempt: " + identifier . toString ( ));
76- else BLENDSTORE_REGISTRY .put (identifier . toString ( ), blendStore );
76+ if (containsKey (identifier )) ClientVMC .LOGGER .error ("Duplicate BlendStore register attempt: " + Config . getBlendName ( identifier ));
77+ else BLENDSTORE_REGISTRY .put (Config . getBlendName ( identifier ), blendStore );
7778 }
7879
7980 public static void registerBlendStore (String path , BlendStore blendStore ) {
8081 registerBlendStore (ClientVMC .identifier (path ), blendStore );
8182 }
8283
8384 /**
84- * NOTE: BONES ARE CURRENTLY NON-FUNCTIONAL. USE BLENDSHAPES INSTEAD.
85- *
8685 * Registers a callback that generates a Bone.
8786 * Bones are defined as 7 floats (a 3D coordinate and a quaternion).
8887 * {@code [x coordinate, y coordinate, z coordinate, quaternion-x, quaternion-y, quaternion-z, quaternion-w]}
89- *
88+ *
89+ * @implNote BONES ARE CURRENTLY NON-FUNCTIONAL. USE BLENDSHAPES INSTEAD.
90+ *
9091 * @param identifier The ID for the Bone. Note: This will be converted into a string when being sent over OSC.
9192 * @param callback A function that uses the client to output a list of floats.
9293 */
0 commit comments