CustomPlayerModels icon indicating copy to clipboard operation
CustomPlayerModels copied to clipboard

How did .cpmmodel encrypted?

Open none283 opened this issue 2 years ago • 2 comments

.cpmproject is .zip, how about .cpmmodel? I want to view .cpmmodel in format that can read

Cause i tried to use your API to export a .cpmproject by code class.txt

I almost got it, but some part not right so the skin didn't exported and the skin is black when used it (The animations, the models all good, only skin not imported)

What did exported using CPM normal way Screenshot 2023-03-04 184822

What am trying to do (load .cpmproject, and export into a .cpmmodel file by CPM API with my mod) Screenshot 2023-03-04 184807

none283 avatar Mar 04 '23 15:03 none283

Please learn Java before making addons!

You have the wrong event. Please don't change the players' models without some user interaction. You don't need half of the code in the class. Use editor.load(file) and Exporter.exportModel(...). Also use the EditorGui instance for editor.frame. You can create a GuiImpl class instead of implementing IGui, or copy a headless implementation like this: BBGui.java (You have to change the openURL0, i18nFormat method) The exporter won't work on dedicated servers, CPM can't load or save image files. You are exporting before the load is finished, use the returned CompletableFuture.

tom5454 avatar Mar 04 '23 18:03 tom5454

Please learn Java before making addons!

You have the wrong event. Please don't change the players' models without some user interaction. You don't need half of the code in the class. Use editor.load(file) and Exporter.exportModel(...). Also use the EditorGui instance for editor.frame. You can create a GuiImpl class instead of implementing IGui, or copy a headless implementation like this: BBGui.java (You have to change the openURL0, i18nFormat method) The exporter won't work on dedicated servers, CPM can't load or save image files. You are exporting before the load is finished, use the returned CompletableFuture.

Thank you for help, i editted and use CompletableFuture like you said, but it seem failed when load .cpmproject? (My .cpmproject file is good and loaded success in normal) none_core_player_model_0.3_anims.zip

My code edited: class.txt

It throw Cannot assign field \"scale\" Error when i tried to change into new .cpmmodel generated by code log.txt

Any idea about it?

none283 avatar Mar 05 '23 07:03 none283