Skip to content

feat: Enable Farmer bot support for legacy 1.8 to 1.12.2#3087

Open
Copilot wants to merge 2 commits intomasterfrom
copilot/mcc-dev-workflowanalyze-inventory-handling-issues
Open

feat: Enable Farmer bot support for legacy 1.8 to 1.12.2#3087
Copilot wants to merge 2 commits intomasterfrom
copilot/mcc-dev-workflowanalyze-inventory-handling-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 17, 2026

Farmer was blocked on 1.8-1.12.2 by bot-specific gaps, not by missing core inventory support. This updates the legacy crop and placement paths so Farmer can run on pre-flattening versions where MCC already supports terrain and inventory handling.

  • Farmer legacy compatibility

    • lower the Farmer startup gate from < 1.13 to < 1.8
    • add pre-1.13 crop maturity checks using legacy block ID + metadata
    • handle legacy melon/pumpkin stems by treating max-age stems or stems adjacent to fruit as harvestable
  • Legacy block mapping

    • add missing 1.12.2 beetroot mapping in Palette112 so world scans can discover beetroot crops
  • Legacy protocol fix

    • fix the < 1.9 PlayerBlockPlacement path to actually send the packet after encoding it
    • this unblocks planting and bonemeal interactions on 1.8.x
  • Docs and messaging

    • update the Farmer unsupported-version message to reflect the real floor of 1.8
    • remove stale docs claiming inventory handling is unsupported on 1.8-1.9
    • tighten the Farmer docs to describe it as experimental, especially on legacy versions

Example of the legacy maturity path added for pre-1.13 crops:

private bool IsLegacyCropFullyGrown(Block block, CropType cropType, Location? location)
{
    return cropType switch
    {
        CropType.Beetroot => block.BlockId == 207 && block.BlockMeta >= 3,
        CropType.Carrot => block.BlockId == 141 && block.BlockMeta >= 7,
        CropType.Melon => block.BlockId == 105
            && (block.BlockMeta >= 7 || HasAdjacentBlock(location, Material.Melon)),
        CropType.NetherWart => block.BlockId == 115 && block.BlockMeta >= 3,
        CropType.Pumpkin => block.BlockId == 104
            && (block.BlockMeta >= 7 || HasAdjacentBlock(location, Material.Pumpkin)),
        CropType.Potato => block.BlockId == 142 && block.BlockMeta >= 7,
        CropType.Wheat => block.BlockId == 59 && block.BlockMeta >= 7,
        _ => false
    };
}

Copilot AI and others added 2 commits April 17, 2026 07:55
@milutinke milutinke changed the title Enable Farmer bot support for legacy 1.8 to 1.12.2 [WIP] feat: Enable Farmer bot support for legacy 1.8 to 1.12.2 Apr 17, 2026
@milutinke milutinke changed the title [WIP] feat: Enable Farmer bot support for legacy 1.8 to 1.12.2 feat: Enable Farmer bot support for legacy 1.8 to 1.12.2 Apr 18, 2026
@milutinke milutinke marked this pull request as ready for review April 18, 2026 18:44
@milutinke
Copy link
Copy Markdown
Member

Tested it a bit, I'll merge it after the movement refactoring and after I test it a bit more.

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.

2 participants