Conversation
Summary of ChangesHello, 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! This pull request addresses a missing recipe issue for long sticks within the Storage Drawers integration. By checking for material properties, it ensures that materials without standard ingot or gem forms can still be processed correctly using the extruder. Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request adds a new extruder recipe for materials that lack both Ingot and Gem properties to support Storage Drawers integration. I have reviewed the logic and identified a bug in the conditional check: the current implementation uses an OR operator, which would incorrectly register recipes for materials that possess one of the two properties. I have suggested changing this to an AND operator to ensure the recipe is only registered for materials that truly lack both.
| addStorageUpgradeConvertRecipe(Mods.StorageDrawers.getItem("upgrade_storage", 1, 4), output, material); | ||
| } | ||
|
|
||
| if (!material.hasProperty(PropertyKey.INGOT) || !material.hasProperty(PropertyKey.GEM)) { |
There was a problem hiding this comment.
この条件式は、INGOT または GEM のプロパティのいずれかを持たない場合に真となります。しかし、プルリクエストの目的は「Ingot または Gem を持たないマテリアル」のレシピを修正することであり、これは通常 INGOT と GEM の両方を持たないマテリアルを指すと解釈されます。
現在の || (OR) 条件では、INGOT プロパティは持つが GEM プロパティは持たないマテリアル(またはその逆)に対しても、この押し出し機レシピが追加されてしまいます。これにより、既存の stickLong レシピと重複したり、意図しないレシピが追加されたりする可能性があります。
INGOT と GEM の両方のプロパティを持たないマテリアルにのみレシピを追加するには、&& (AND) を使用する必要があります。
| if (!material.hasProperty(PropertyKey.INGOT) || !material.hasProperty(PropertyKey.GEM)) { | |
| if (!material.hasProperty(PropertyKey.INGOT) && !material.hasProperty(PropertyKey.GEM)) { |
No description provided.