GithubHelp home page GithubHelp logo

Comments (8)

rj00a avatar rj00a commented on July 23, 2024

The player list entry archetype uses the Properties component to hold the properties from the game profile. If you add textures to the player list entry for the fake player I think it should work.

The value of the textures property is a base64 blob of JSON. You can get some from MineSkin.org. You'll also need the signature.

It's worth testing if any of this is functioning correctly. Time for a new example?

from valence.

dyc3 avatar dyc3 commented on July 23, 2024

A new example would be good, unless we can work it into another large example similar to parkour or ctf.

from valence.

Bafbi avatar Bafbi commented on July 23, 2024

I'm not really fond of having examples for literally every little thing, I think we can just demonstrate it on an existing example that uses an entity and we could having a mapping of certain feature to certain example if someone search something

from valence.

pepperoni21 avatar pepperoni21 commented on July 23, 2024

The player list entry archetype uses the Properties component to hold the properties from the game profile. If you add textures to the player list entry for the fake player I think it should work.

The value of the textures property is a base64 blob of JSON. You can get some from MineSkin.org. You'll also need the signature.

It's worth testing if any of this is functioning correctly. Time for a new example?

We can't access the GameProfile struct though

from valence.

dyc3 avatar dyc3 commented on July 23, 2024

He's talking about this component:

pub struct Properties(pub Vec<Property>);
impl Properties {
/// Finds the property with the name "textures".
pub fn textures(&self) -> Option<&Property> {
self.0.iter().find(|prop| prop.name == "textures")
}
/// Finds the property with the name "textures".
pub fn textures_mut(&mut self) -> Option<&mut Property> {
self.0.iter_mut().find(|prop| prop.name == "textures")
}
}

from valence.

dyc3 avatar dyc3 commented on July 23, 2024

I was able to get a custom skin on a player entity, but it's unclear to me where the signature comes from, and whether or not it's required.

In the base64, there's a field called signatureRequired that would imply you could make it optional, but setting it to false does not work.

{
  "timestamp" : 1691706573156,
  "profileId" : "e88274eb3f514d60bc1ad95481218303",
  "profileName" : "AnimalTheGamer",
  "signatureRequired" : true,
  "textures" : {
    "SKIN" : {
      "url" : "http://textures.minecraft.net/texture/1de2c83f8f4fb38069f55f52e4f8ee5f0867229ead91b7e79def754b70ea9433",
      "metadata" : {
        "model" : "slim"
      }
    }
  }
}

from valence.

Bafbi avatar Bafbi commented on July 23, 2024

@dyc3 https://wiki.vg/Mojang_API#UUID_to_Profile_and_Skin.2FCape
It doesn't even seems to be the default to have it signed

from valence.

dyc3 avatar dyc3 commented on July 23, 2024

From my experimenting, it appears that by default, the notchian Minecraft client always verifies the signatures of player skins. I think what mineskin.org is doing is requesting a skin change for some minecraft account, and then letting mojang sign the texture, and returning those values back to the end user. I think mojang will keep the skin in their CDNs even after another skin change? That part is somewhat unclear.

from valence.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.