Skip to content

Improve item match pattern#95

Open
ploptaw wants to merge 3 commits intoGiganticMinecraft:mainfrom
ploptaw:improvement/match-pattern
Open

Improve item match pattern#95
ploptaw wants to merge 3 commits intoGiganticMinecraft:mainfrom
ploptaw:improvement/match-pattern

Conversation

@ploptaw
Copy link
Copy Markdown
Contributor

@ploptaw ploptaw commented Mar 25, 2026

このPRの変更点と理由:

通常GT,titan replica3,icarus_4thanniv にLoreの条件を追加し,マッチパターンの改善を行った

ploptaw added 2 commits March 26, 2026 00:50
- 通常GT,titan replica3,icarus_4thannivにLoreの条件を追加
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

このプルリクエストは、OptiFineのカスタムアイテムテクスチャ(CIT)のマッチングロジックを改善することを目的としています。特定のアイテムにLore(説明文)の条件を追加することで、テクスチャがより正確に適用されるようになり、アイテムの識別精度が向上します。これにより、ユーザーは意図したカスタムテクスチャを確実に表示できるようになります。

Highlights

  • Lore条件の追加: Apollo、Hercules、Icarus、Nemesis、Gaea、Thanatos、Titan、Artemis、Plutoといった様々なカスタムアイテムにLore(説明文)の条件を追加し、テクスチャのマッチング精度を向上させました。
  • icarus_4thannivアイテムの更新: icarus_4thannivアイテムのプロパティを更新し、テクスチャ製作者を示すLoreテキストを追加しました。また、破損したアイテムのnbt.display.Nameを調整しました。
  • 更新履歴の追加: v18.31の新しいエントリをUpdatedLog.mdに追加し、テクスチャ割り当てのマッチパターン改善について記載しました。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces version v18.31 in the update log, focusing on improving texture assignment match patterns. The changes involve adding or modifying nbt.display.Lore properties in various item configuration files (armors, tools, weapons) to use iregex patterns for matching item descriptions. The review comments suggest that the iregex patterns might not be robust enough when Minecraft color codes are present in the Lore text. It is recommended to use ipattern for more reliable matching, especially for fixed strings, and to consider splitting properties files for complex OR logic patterns, as ipattern does not support it.

texture.diamond_layer_2=diamond_layer_2
nbt.display.Name=APOLLO
weight=-1 No newline at end of file
nbt.display.Lore.1=iregex:(装備中は満腹度自動回復と|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、apollo_lore1.propertiesapollo_lore2.propertiesのようにです。

items=minecraft:diamond_helmet
texture=diamond_helmet
nbt.display.Name=APOLLO
nbt.display.Lore.1=iregex:(装備中は満腹度自動回復と|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、apollo_lore1.propertiesapollo_lore2.propertiesのようにです。

texture.diamond_layer_2=diamond_layer_2
nbt.display.Name=HERCULES
weight=-1 No newline at end of file
nbt.display.Lore.1=iregex:(装備中は跳躍力が付与されます|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、hercules_lore1.propertieshercules_lore2.propertiesのようにです。

items=minecraft:diamond_boots
texture=diamond_boots
nbt.display.Name=HERCULES
nbt.display.Lore.1=iregex:(装備中は跳躍力が付与されます|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、hercules_lore1.propertieshercules_lore2.propertiesのようにです。

texture=armor
nbt.display.Name=ICARUS
weight=-1 No newline at end of file
nbt.display.Lore.1=iregex:(装備中は火炎耐性が付与されます|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、icarus_lore1.propertiesicarus_lore2.propertiesのようにです。

items=minecraft:diamond_pickaxe
texture=thanatos
nbt.display.Name=THANATOS
nbt.display.Lore.1=iregex:(最大体力\\(中\\)増加|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、thanatos_lore1.propertiesthanatos_lore2.propertiesのようにです。

items=minecraft\:diamond_axe
texture=titan
nbt.display.Name=TITAN
nbt.display.Lore.1=iregex:(敵を空中へ打ち上げます|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、titan_lore1.propertiestitan_lore2.propertiesのようにです。

Comment on lines +6 to +7
nbt.display.Lore.*=耐久無限
nbt.display.Lore.*=iregex:.*クリスマスイベント特別限定品
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

カラーコードに対応するために、マッチングをより堅牢にするにはipatternの使用を推奨します。iregexはMinecraftのカラーコードを処理せず、プレーンな文字列照合はフォーマットが存在すると失敗します。両方の条件にipatternを使用することで、マッチングの信頼性が高まります。

nbt.display.Lore.*=ipattern:*耐久無限*
nbt.display.Lore.*=ipattern:*クリスマスイベント特別限定品*

texture.bow_pulling_1=artemis_pulling_1
texture.bow_pulling_2=artemis_pulling_2
nbt.display.Name=ARTEMIS
nbt.display.Lore.1=iregex:(打つと花火があがります|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、artemis_lore1.propertiesartemis_lore2.propertiesのようにです。

items=minecraft:diamond_sword
texture=pluto
nbt.display.Name=PLUTO
nbt.display.Lore.1=iregex:(攻撃時に敵をウィザー状態にします|右クリックで1個取り出し)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

iregexパターンは、LoreのテキストにMinecraftのカラーコードが含まれているとマッチしません。カラーコードが存在する可能性がある場合は、ipatternの使用を検討してください。ipatternはORロジック(|)をサポートしていないため、堅牢なマッチングを保証するには、このプロパティファイルを2つに分割し、それぞれのLore条件に1つずつ対応させる必要があるかもしれません。例えば、pluto_lore1.propertiespluto_lore2.propertiesのようにです。

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

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.

1 participant