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.
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?
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/MinecraftMo...