#(ladycat_7018) What's skin data?

64 messages · Page 1 of 1 (latest)

near sail
#

I'm currently using the citizens plugin for development and have run into an issue when trying to set a player npc's skin with a SkinTrait. I've tried using the method setSkinPersistent(String name, String signature, String data) but quickly found that I have no idea what the String data is and how to get it. (Google couldn't help) Thanks in advance for helping!

sharp rapidsBOT
#

(ladycat_7018) What's skin data?

sharp rapidsBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

autumn bane
near sail
#

ah, ok

#

thanks

storm sandBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@near sail

#
Resolved

Thread closed as resolved.

near sail
storm sandBOT
#
Thread Reopened

Thread was manually reopened by @near sail.

autumn bane
#

if you base 64 decode that you get a json object

#

but all skins have to be paired with a signature that must be signed by mojang

near sail
#

So I need to encode a json object and not a URL or a string?

autumn bane
near sail
#

I'm already using mineskin and got the signature, but I don't know where to find the encoded part

past pivot
#

!skins

quick condorBOT
past pivot
#

oh discord didn't load

near sail
# autumn bane it's the "texture"

there is nothing called texture that I can copy. only texture url and texture hash. do I need to sign in in order to get that value?

autumn bane
#

I believe

near sail
#

well I tried using the texture hash but it spawns a completely different skin and says that the skin data is invalid

autumn bane
#

If you see here from mineskin, you have value and signature

#

Value is the encoded texture data

#

Signature is the encoded signature data

near sail
#

ah

#

thank you

storm sandBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@near sail

near sail
#

tried the value just now (sry for the delay again)

#

and it doesn't work either

#

I might have to fix some stuff though cause the entire code is currently buggy

near sail
#

as it turns out the skin of the npc doesn't depend on the skin trait I give it but on the name ;-;

#

how do I make the npc's name independent from its skin?

autumn bane
#

like a uuid

autumn bane
#

@near sail what's your code?

near sail
#

also the citizens java doc doesn't seem to be working (at least for me)

#

it either gives me 403 or 404 errors when I try to open the page

autumn bane
autumn bane
#

you are doing it wrong

near sail
#

alr, so I need to give it a class and not a trait

#

ig I need to make a new Class or how does this work?

autumn bane
#

SkinTrait.class

near sail
#

ah

near sail
#

jd is down again btw

near sail
#

i don't get how I'm supposed to do this

autumn bane
#

@near sail SkinTrait trait = npc.getOrAddTrait(SkinTrait.class);

near sail
#

oh

storm sandBOT
#
Resolved

Thread closed as resolved.

near sail
#

mb I resolved too quickly ;-;
so the right skin now shows but the console is spaming this

storm sandBOT
#
Thread Reopened

Thread was manually reopened by @near sail.

near sail
#

oh sry it's not spaming

autumn bane
near sail
#

hm, ok