Skip to content

Enhanced FFM Integration and Detailed Refactoring#16

Merged
tier940 merged 1 commit intomainfrom
tier-ffm-util-upgrade
Mar 16, 2026
Merged

Enhanced FFM Integration and Detailed Refactoring#16
tier940 merged 1 commit intomainfrom
tier-ffm-util-upgrade

Conversation

@tier940
Copy link
Member

@tier940 tier940 commented Mar 16, 2026

No description provided.

@tier940 tier940 self-assigned this Mar 16, 2026
@gemini-code-assist
Copy link

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!

このプルリクエストは、主にForestryおよびGendustryモジュールとの連携を強化し、ユーザーエクスペリエンスとコードの堅牢性を向上させることを目的としています。Industrial Apiaryの内部ロジックを大幅に改善し、蜂の活動の追跡、エネルギー消費、自動繁殖、およびクライアントとの同期をより正確に行えるようにしました。また、蜂のツールチップに詳細な花の情報を提供したり、パーティクルエフェクトの視覚的な問題を修正したりすることで、ゲームプレイの質を高めています。全体として、既存の機能の洗練と、将来的な拡張のための基盤強化に焦点を当てています。

Highlights

  • ForestryとGendustry連携の強化: Industrial Apiaryの動作ロジックを改善し、蜂の活動追跡、エネルギー消費、自動繁殖、クライアント同期をより正確に行えるようにしました。
  • Industrial ApiaryのMetaTileEntity ID設定: Industrial ApiaryとMega ApiaryのMetaTileEntity IDをコンフィグファイルで設定できるようになりました。
  • 蜂のツールチップとパーティクルエフェクトの改善: 分析済みの蜂のアイテムツールチップに受容可能な花のブロックリストを表示する機能を追加し、蜂のパーティクルエフェクトの色を修正しました。
  • The One Probe (TOP)連携の整理: 蜂の飼育器の情報プロバイダの登録をForestryモジュールからTOPモジュールに移動し、関連コードを整理しました。
  • サトウキビ植え付けサウンドの変更: サトウキビの植え付け時のサウンドエフェクトを、ForestryのネットワークパケットからMinecraftのネイティブなサウンドシステムを使用するように変更しました。
  • 不要なMixin設定の削除: GregTech関連の不要なMixin設定を削除し、コードベースを整理しました。
Changelog
  • src/main/java/com/github/gtexpert/gtbm/api/gui/GTBMGuiTextures.java
    • JEIの蜂のステータスアイコンに関するコメントを更新しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/ForestryModule.java
    • BeeHousingInfoProviderの登録を削除しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/farming/FarmableGTCEuSapling.java
    • サトウキビの植え付け時のサウンドエフェクトを、ForestryのネットワークパケットからMinecraftのネイティブなサウンド再生に切り替えました。
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/util/ForestryBeeHelper.java
    • ModuleApicultureのインポートを追加し、getTicksPerWorkCycleメソッドのJavadocを更新しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/util/ForestryFarmHelper.java
    • humusブロックとthermionic_tubesアイテムの取得方法をModuleCoreからMods.Forestry.getItemを使用するように変更しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gendustry/GendustryConfigHolder.java
    • Industrial ApiaryとMega ApiaryのMetaTileEntity IDを設定するための新しいコンフィグオプションを追加しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gendustry/GendustryModule.java
    • モジュール名を「GTBeesMatrix Gendustry Integration」に短縮しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gendustry/metatileentities/GendustryMetaTileEntities.java
    • Industrial ApiaryとMega Apiaryの登録に、新しく追加されたコンフィグからのIDを使用するように変更しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gendustry/metatileentities/IndustrialApiaryLogic.java
    • Industrial Apiaryの蜂の作業ロジックを大幅に改善し、アクセサー、初期化、修飾子管理、ティック更新、進行状況追跡、自動繁殖、シリアライゼーションに関する詳細なJavadocと実装を追加しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gendustry/metatileentities/MetaTileEntityIndustrialApiary.java
    • クライアント側での蜂のロジックデータ同期を処理するために、pendingBeeLogicDataフィールドとapplyPendingBeeLogicDataメソッドを追加しました。
  • src/main/java/com/github/gtexpert/gtbm/integration/gtfo/farming/FarmableGTFOSapling.java
    • サトウキビの植え付け時のサウンドエフェクトを、ForestryのネットワークパケットからMinecraftのネイティブなサウンド再生に切り替えました。
  • src/main/java/com/github/gtexpert/gtbm/integration/top/TOPModule.java
    • BeeHousingInfoProviderの登録をForestryModuleからこのモジュールに移動しました。
  • src/main/java/com/github/gtexpert/gtbm/mixins/GTBMMixinLoader.java
    • Mods.Names.GREGTECHのMixin設定を削除しました。
  • src/main/java/com/github/gtexpert/gtbm/mixins/forestry/FlowerRegistryAccessor.java
    • ForestryのFlowerRegistryの内部データにアクセスするための新しいMixinアクセサーを追加しました。
  • src/main/java/com/github/gtexpert/gtbm/mixins/forestry/ItemBeeGEMixin.java
    • 分析済みの蜂のアイテムツールチップに、Shiftキーを押しながら表示される受容可能な花のブロックリストを追加する新しいMixinを追加しました。
  • src/main/java/com/github/gtexpert/gtbm/mixins/forestry/ParticleRenderMixin.java
    • 蜂のパーティクルエフェクトの色が、種のオーバーレイカラーを使用するように修正する新しいMixinを追加しました。
  • src/main/resources/mixins.gtbm.forestry.json
    • 新しいForestry関連のMixinを登録するように設定を更新しました。
  • src/main/resources/mixins.gtbm.gregtech.json
    • GregTech関連のMixin設定ファイルを削除しました。
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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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

@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

このプルリクエストは、FFM (Forestry For Minecraft) との連携を強化し、いくつかのリファクタリングを行うものです。主な変更点は以下の通りです。

  • The One Probe (TOP) のプロバイダー登録ロジックを、ForestryモジュールからTOPモジュールに移動し、責務を明確にしました。
  • 木の苗を植える際のサウンド再生処理を、ForestryのカスタムパケットからMinecraft標準の world.playSound を使用するように変更し、コードを簡素化しました。
  • Gendustry連携において、MetaTileEntityのIDをハードコードされた値から設定ファイルで変更可能な値にリファクタリングし、柔軟性を向上させました。
  • Industrial Apiaryの同期ロジックを大幅にリファクタリングし、チャンク読み込み時などにクライアント側で女王蜂のデータが失われる可能性がある問題を修正しました。
  • 新しいMixinを追加し、分析済みの蜂のツールチップに許容される花のリストを表示する機能と、蜂のパーティクルの色を種固有の色に修正する機能を追加しました。

全体的に、コードの可読性、保守性、安定性を向上させる素晴らしい変更です。例外処理に関する軽微な改善提案をさせていただきます。

}
}
}
} catch (Exception ignored) {}

Choose a reason for hiding this comment

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

medium

例外を完全に無視する (ignored) のではなく、ログに出力することを推奨します。
ツールチップの表示はクリティカルな機能ではないため、ここでクラッシュを防ぐこと自体は正しいアプローチです。しかし、将来的にForestryの内部実装が変更された場合などに問題が発生した際、例外が無視されていると原因調査が非常に困難になります。
デバッグを容易にするため、少なくとも警告 (warn) レベルで例外をログに出力するのが良いでしょう。プロジェクトで利用されている com.github.gtexpert.gtbm.api.util.ModLog.logger を使用できます。

        } catch (Exception e) {
            com.github.gtexpert.gtbm.api.util.ModLog.logger.warn("Failed to get accepted flower names for tooltip", e);
        }

@tier940 tier940 changed the title FFM連携強化と細やかなリファクタ Enhanced FFM Integration and Detailed Refactoring Mar 16, 2026
@tier940 tier940 merged commit 18ea1ec into main Mar 16, 2026
2 checks passed
@tier940 tier940 deleted the tier-ffm-util-upgrade branch March 16, 2026 07:00
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