How does /cpm setskin actually work?
Jackiecrazy opened this issue ยท 1 comments
I am trying to assign custom models to the player as soon as they pick an origin. The command takes a player parameter and what I assume to be a skin parameter, but typing in a model I found in the model folder, such as "Exiledmale", resets me to my default model, and whatever was there before comes back after a reload. I checked the config json, and it seems like it requires the .cpmmodel affix to save. Typing in "Exiledmale.cpmmodel", however, generates the following error:
java.lang.IllegalArgumentException: Illegal base64 character 2e
at java.util.Base64$Decoder.decode0(Base64.java:714) ~[?:1.8.0_332]
at java.util.Base64$Decoder.decode(Base64.java:526) ~[?:1.8.0_332]
at java.util.Base64$Decoder.decode(Base64.java:549) ~[?:1.8.0_332]
at com.tom.cpm.shared.config.PlayerData.setModel(PlayerData.java:29) ~[cpm:0.3.1a]
at com.tom.cpm.shared.network.NetHandler.setSkin(NetHandler.java:451) ~[cpm:0.3.1a]
at com.tom.cpm.shared.CommandCPM.executeSkinChange(CommandCPM.java:140) ~[cpm:0.3.1a]
at com.tom.cpm.shared.CommandCPM.lambda$register$3(CommandCPM.java:47) ~[cpm:0.3.1a]
at com.tom.cpl.command.BrigadierCommandHandler.lambda$build$1(BrigadierCommandHandler.java:72) ~[cpm:0.3.1a]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[brigadier-1.0.17.jar:?]
at net.minecraft.command.Commands.func_197059_a(Commands.java:217) ~[?:?]
at net.minecraft.network.play.ServerPlayNetHandler.func_147361_d(ServerPlayNetHandler.java:1119) ~[?:?]
at net.minecraft.network.play.ServerPlayNetHandler.func_244548_c(ServerPlayNetHandler.java:1102) ~[?:?]
at net.minecraft.network.play.ServerPlayNetHandler.func_147354_a(ServerPlayNetHandler.java:1081) ~[?:?]
at net.minecraft.network.play.client.CChatMessagePacket.func_148833_a(SourceFile:36) ~[?:?]
at net.minecraft.network.play.client.CChatMessagePacket.func_148833_a(SourceFile:9) ~[?:?]
at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?]
at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?]
at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:734) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:717) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:711) ~[?:?]
at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?]
at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:696) ~[?:?]
at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:646) ~[?:?]
at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?]
at java.lang.Thread.run(Thread.java:750) [?:1.8.0_332]
I am using 0.3.1a for Forge 1.16.5.
You have to put the base64 exported model as the argument (is't base64 encoded string of the model)
https://github.com/tom5454/CustomPlayerModels/wiki/The--cpm-command#setskin