Skip to content

Fix Tree Farm logic#15

Merged
tier940 merged 5 commits intomainfrom
tier-ffm-farm
Mar 15, 2026
Merged

Fix Tree Farm logic#15
tier940 merged 5 commits intomainfrom
tier-ffm-farm

Conversation

@tier940
Copy link
Member

@tier940 tier940 commented Mar 15, 2026

No description provided.

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

gemini-code-assist bot commented Mar 15, 2026

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!

This pull request significantly enhances the integration of GregTech Bees Matrix (GTBM) with Forestry's multifarm system. It addresses previous limitations by implementing custom farm logic and farmable definitions for GregTech Rubber trees and GregTech Food Option (GTFO) fruit trees. The changes ensure these specialized trees are properly recognized and processed by Forestry farms, improving gameplay consistency and functionality. A new helper utility streamlines the registration process for future farm types.

Highlights

  • Custom Forestry Farm Logic: Introduced dedicated FarmLogicCEu and FarmLogicGTFO classes to provide specific arboreal farm logic for GregTech Rubber trees and GregTech Food Option (GTFO) fruit trees, respectively.
  • Custom Farmable Definitions: Created FarmableGTRubberSapling and FarmableGTFOSapling classes to correctly define how GregTech Rubber saplings and GTFO fruit tree saplings interact with Forestry farms, including handling their specific products like sticky resin and apples.
  • Farm Type Registration Helper: Added a new utility class, ForestryFarmHelper, to centralize and simplify the registration of custom Forestry farm types and their associated circuit recipes, improving modularity and reducing boilerplate.
  • Integration Loader Updates: Modified FFMFarmingLoader and GTFOFarmingLoader to utilize the new custom farm logic and farmable definitions, replacing the previous generic sapling handling with more precise and functional implementations.
  • Localization Updates: Added new localization entries in both English and Japanese for the 'Rubber Farm' and 'Fruit Farm' types, ensuring proper display names within the game.
Changelog
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/farming/FarmLogicCEu.java
    • Added custom arboreal farm logic for GregTech Rubber trees.
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/farming/FarmableGTRubberSapling.java
    • Added a custom farmable definition for GregTech Rubber saplings.
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/loaders/FFMFarmingLoader.java
    • Updated Forestry farming loader to register custom GregTech Rubber tree farm logic and farmables.
    • Replaced generic FarmableSapling with FarmableGTRubberSapling for GregTech Rubber trees.
  • src/main/java/com/github/gtexpert/gtbm/integration/forestry/util/ForestryFarmHelper.java
    • Added a utility class to streamline the registration of Forestry farm types and circuits.
  • src/main/java/com/github/gtexpert/gtbm/integration/gtfo/farming/FarmLogicGTFO.java
    • Added custom arboreal farm logic for GregTech Food Option (GTFO) fruit trees.
  • src/main/java/com/github/gtexpert/gtbm/integration/gtfo/farming/FarmableGTFOSapling.java
    • Added a custom farmable definition for GTFO saplings, including windfall products and item damage handling.
  • src/main/java/com/github/gtexpert/gtbm/integration/gtfo/loaders/GTFOFarmingLoader.java
    • Updated GTFO farming loader to dynamically register custom GTFO fruit tree farm logic and farmables.
    • Replaced generic FarmableSapling with FarmableGTFOSapling and added reflection to handle various GTFO tree types.
  • src/main/resources/assets/gtbm/lang/en_us.lang
    • Added English localization entries for new farm types: 'Rubber Farm' and 'Fruit Farm'.
  • src/main/resources/assets/gtbm/lang/ja_jp.lang
    • Added Japanese localization entries for new farm types: 'ゴムの木農園' and '果樹農園'.
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

This pull request introduces integration with Forestry's multifarms for GregTech CEu rubber trees and GTFO fruit trees. It adds new farm logics and farmables, and a helper class to simplify farm registration. The changes are well-structured. I've found a potential issue in the new farmable classes where a player's held item is not correctly restored, which could lead to item loss. I've provided suggestions to fix this.

@tier940 tier940 merged commit ed56508 into main Mar 15, 2026
2 checks passed
@tier940 tier940 deleted the tier-ffm-farm branch March 15, 2026 15:11
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