Skip to content

Fix OBJ Material Legacy Mapping#18

Merged
jonafanho merged 2 commits into
Minecraft-Transit-Railway:rewritefrom
AmberIsFrozen:fix-4
Apr 5, 2026
Merged

Fix OBJ Material Legacy Mapping#18
jonafanho merged 2 commits into
Minecraft-Transit-Railway:rewritefrom
AmberIsFrozen:fix-4

Conversation

@AmberIsFrozen

Copy link
Copy Markdown
Member

Change them to comply with NTE

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates OBJ material “legacy” shader tag mapping across Fabric/Forge and multiple Minecraft versions to align with the NTE naming scheme.

Changes:

  • Add support for exteriortranslucent -> TRANSLUCENT.
  • Replace legacy tag handling from underscored forms to non-underscored forms (lighttranslucent, interiortranslucent).
  • Apply the same mapping updates across all supported Fabric/Forge mapping modules.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
forge/1.20.4-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
forge/1.20.1-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
forge/1.19.4-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
forge/1.19.2-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
forge/1.18.2-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
forge/1.17.1-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.
fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/render/obj/ObjModelLoader.java Updates legacy shader tag string-to-ShaderType mapping cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
Comment on lines 164 to 168
private static OptimizedModel.ShaderType legacyMapping(String type) {
switch (type.toLowerCase(Locale.ENGLISH)) {
case "exteriortranslucent":
return OptimizedModel.ShaderType.TRANSLUCENT;
case "light":

Copilot AI Feb 21, 2026

Copy link

Choose a reason for hiding this comment

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

legacyMapping dropped support for legacy material tags like always_on_light and interior_translucent; those inputs will now fall back to CUTOUT and change rendering for existing OBJ/MTL content. If this method is meant to preserve backward compatibility, keep the old case labels as aliases (e.g., map always_on_light -> TRANSLUCENT_GLOWING and interior_translucent -> TRANSLUCENT_BRIGHT, and optionally accept both underscored and non-underscored variants).

Copilot uses AI. Check for mistakes.
For backward compatibility, we don't know how many of these models are out there already...
@jonafanho
jonafanho merged commit 0d4a20b into Minecraft-Transit-Railway:rewrite Apr 5, 2026
1 check passed
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