Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cape Textures #256

Merged
merged 12 commits into from
Dec 8, 2024
Merged

Cape Textures #256

merged 12 commits into from
Dec 8, 2024

Conversation

WildfireRomeo
Copy link
Owner

@WildfireRomeo WildfireRomeo commented Dec 6, 2024

Cape implementation from celestialfault's git repo. Not sure if it's 100% done correctly so PR-ing this for now.

@WildfireRomeo
Copy link
Owner Author

WildfireRomeo commented Dec 8, 2024

Reopening because I don't believe this is against TOS, will not merge quite yet though.

In my hours of research, I don't see anywhere in the terms of service (from MULTIPLE years viewed by wayback machine) that you CAN'T use a cape for occasional uses.
It only mentions SELLING them as a no-no. I don't see why having a cape for like 5 people would even be a problem in Mojang's eyes. Especially since it's only viewable by people using the mod.

Commercial Usage Guidelines - Apr 2019
YOU MAY:

  • sell cosmetic items, except for “Capes”, IF the item sold does not give a user an unfair gameplay advantage over anyone else on the server - i.e there can be no “pay to win”.
  • sell positive effects or enhancements (other than “Capes”) IF everyone on the server is positively affected in exactly the same way.

Servers and hosting - Dec 2024
YOU MAY MAKE MONEY BY

  • Selling cosmetics, except for capes or anything that attempts to visually act like the feature of a Minecraft player cape

The "Extended functionality and modifications" section (aka mods) has no mention of capes.

If anyone has a direct source of where it says I cannot do that, then I'd be happy to not add this feature, but as it stands it doesn't seem like a problem to me. I think Mojang only has a problem with it if people are making money off of it.

Sources:
https://web.archive.org/web/20190425124840/https://account.mojang.com/terms
https://www.minecraft.net/en-us/usage-guidelines
Not only that, but the cape clauses are under a "Servers and hosting" section. Which has nothing to do with client mods.

Playing Minecraft with others is one of the best ways to play. You may host a server for Minecraft. You may even charge for access to the server as long as you follow the guidelines in this section. By “server,” we mean a single connecting address or IP number.

@WildfireRomeo WildfireRomeo reopened this Dec 8, 2024
Copy link
Contributor

@celestialfault celestialfault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few issues I noticed while glancing over this


private static final Pattern USERNAME = Pattern.compile("^[a-z0-9_]{1,16}$", Pattern.CASE_INSENSITIVE);
private static final String CAPE_URL = "https://femalegendermod.net/capes/{name}.png";
private static final String FALLBACK_CAPE_URL = "https://femalegendermod.net/capes/{name}.png";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant fallback url

src/main/java/com/wildfire/main/cape/CapeProvider.java Outdated Show resolved Hide resolved
}
}

public static void tick() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is never called from the client tick handler

private static final String CAPE_URL = "https://femalegendermod.net/capes/{name}.png";
private static final String FALLBACK_CAPE_URL = "https://femalegendermod.net/capes/{name}.png";

private static void remove(RemovalNotification<GameProfile, CompletableFuture<@Nullable Identifier>> entry) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire destroy queue could probably be removed and just directly destroy the texture upon it being removed from the cache, as this is only a thing due to the reload cape button added in my fork.

Copy link
Contributor

@celestialfault celestialfault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good aside from a few very minor issues, but nothing important enough to block this.

Identifier texture = tryUrl(player, CAPE_URL.replace("{uuid}", player.getId().toString()));

/*if(texture == null) { //fallback url if existed, which it doesn't.
texture = tryUrl(player, FALLBACK_CAPE_URL.replace("{uuid}", player.getName()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also use .getId().toString()

@Implements(@Interface(iface = SkinTexturesWildfire.class, prefix = "wildfiregender$", unique = true))
public abstract class SkinTexturesWildfireImplMixin {
private @Unique
@Nullable Identifier wildfiregender$overriddenCapeTexture = null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private should be on the same line as the type

@WildfireRomeo WildfireRomeo merged commit 9066535 into fabric-1.21.4 Dec 8, 2024
2 checks passed
@WildfireRomeo WildfireRomeo deleted the feature/cape branch December 8, 2024 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants