-
Notifications
You must be signed in to change notification settings - Fork 68
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
Cape Textures #256
Conversation
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. Commercial Usage Guidelines - Apr 2019
Servers and hosting - Dec 2024
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:
|
There was a problem hiding this 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"; |
There was a problem hiding this comment.
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/mixins/cape/MinecraftClientMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/wildfire/mixins/cape/PlayerListEntryMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/wildfire/mixins/cape/SkinTexturesWildfireImplMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/wildfire/mixins/cape/SkinTexturesWildfireImplMixin.java
Outdated
Show resolved
Hide resolved
src/main/java/com/wildfire/mixins/cape/SkinTexturesWildfireImplMixin.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
public static void tick() { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
Co-authored-by: celeste <[email protected]>
Co-authored-by: celeste <[email protected]>
…lMixin.java Co-authored-by: celeste <[email protected]>
Co-authored-by: celeste <[email protected]>
…lMixin.java Co-authored-by: celeste <[email protected]>
…lMixin.java Co-authored-by: celeste <[email protected]>
…lMixin.java Co-authored-by: celeste <[email protected]>
- Remove tick() and destroy queue - Change name to uuid - Fixed a few things
There was a problem hiding this 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())); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
Cape implementation from celestialfault's git repo. Not sure if it's 100% done correctly so PR-ing this for now.