Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Making a network based cape system
Post Body

So you see optifine cape system? I am trying to reverse engineer it. The reason why is because other than lunar client, which I refuse to try to break apart, I am trying to break down how I can make a mod, where everyone can see the cape...

Reguardless I have got a speical issue how not understanding the code

private final void loadCape(final AbstractClientPlayerEntity acp)
{
final String name = acp.getName().getString();
final NetworkPlayerInfo playerInfo = acp.getPlayerInfo();
Util.getServerExecutor().execute(() -> {
try
{
final URL url = new URL(String.format("http://s.optifine.net/capes/%s.png", name));
final NativeImage nativeImage = NativeImage.read(url.openStream());
final DynamicTexture dynamicTexture = new DynamicTexture(this.parseCape(nativeImage));
final ResourceLocation resourceLocation = mc.getTextureManager().getDynamicTextureLocation("optifinecapes/", dynamicTexture);
mc.getTextureManager().loadTexture(resourceLocation, dynamicTexture);
playerInfo.playerTextures.put(Type.CAPE, resourceLocation);
playerInfo.playerTextures.put(Type.ELYTRA, resourceLocation);
}
catch (final IOException e)
{
// no cape
}
});

I understand the structure to a degree, it goes to site to replicate this, but what I do not fully grasp is, if I wanted to set up my own site, how would I make the png user name system?

Author
Account Strength
100%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,941
Link Karma
1,261
Comment Karma
665
Profile updated: 4 days ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago