Skip to content

Remove hardcoded armor texture paths to fix rendering - #3

Closed
zayoon0o0 with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-armor-textures
Closed

Remove hardcoded armor texture paths to fix rendering#3
zayoon0o0 with Copilot wants to merge 4 commits into
mainfrom
copilot/fix-armor-textures

Conversation

Copilot AI commented Dec 13, 2025

Copy link
Copy Markdown

Armor textures weren't rendering because custom renderer classes were overriding texture resolution with hardcoded full paths, preventing Minecraft's equipment JSON system from working.

Changes

  • Removed texture path overrides in GemArmorArmor and AmythestArmorArmor that were registering armor items with hardcoded paths like "mymod:textures/models/armor/ruby_layer_1.png"
  • Removed armor item registrations from ARMOR_MODELS map to allow default rendering pipeline to handle texture resolution via equipment JSON

Before/After

// Before: Hardcoded override prevented proper texture resolution
MymodModArmorModels.ARMOR_MODELS.put(MymodModItems.GEM_ARMOR_HELMET, new MymodModArmorModels.ArmorModel() {
    @Override
    public ResourceLocation getArmorTexture(...) {
        return ResourceLocation.parse("mymod:textures/models/armor/ruby_layer_1.png");
    }
});

// After: Equipment JSON resolves textures automatically
public static void clientLoad() {
    // No registration - equipment JSON handles texture resolution
}

Equipment JSON files correctly reference mymod:ruby and mymod:amethyst, which now properly resolve to ruby_layer_1.png/ruby_layer_2.png and amethyst_layer_1.png/amethyst_layer_2.png based on armor piece type.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • maven.fabricmc.net
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx3G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx3G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

fix armor textures and make it work


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits December 13, 2025 05:10
Co-authored-by: zayoon0o0 <125116818+zayoon0o0@users.noreply.github.com>
Co-authored-by: zayoon0o0 <125116818+zayoon0o0@users.noreply.github.com>
Co-authored-by: zayoon0o0 <125116818+zayoon0o0@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix armor textures and ensure functionality Remove hardcoded armor texture paths to fix rendering Dec 13, 2025
Copilot AI requested a review from zayoon0o0 December 13, 2025 05:17
@zayoon0o0
zayoon0o0 marked this pull request as ready for review December 13, 2025 05:46
@zayoon0o0 zayoon0o0 closed this Dec 24, 2025
@zayoon0o0
zayoon0o0 deleted the copilot/fix-armor-textures branch December 24, 2025 03:52
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.

2 participants