Skip to content

Bulk compression does not detect Productive Bees configurable comb chains with bee_type data #218

Description

@Forever-178

Summary

MEGACells fails to detect bulk compression chains for Productive Bees configurable comb items when the stacks contain the productivebees:bee_type data component.

The affected recipes are:

  • productivebees:comb_block/configurable_honeycomb
  • productivebees:comb_block/configurable_comb_block

These recipes represent the reversible conversion between configurable honeycombs and configurable comb blocks, for example:

  • 4x configurable_honeycomb{productivebees:bee_type=xxx} -> configurable_comb{productivebees:bee_type=xxx}
  • configurable_comb{productivebees:bee_type=xxx} -> 4x configurable_honeycomb{productivebees:bee_type=xxx}

Steps to Reproduce

  1. Install MEGACells together with Productive Bees. (Or use this commit to run the gradle runClient task. Forever-178@b984724)
  2. Obtain a normal Productive Bees configurable honeycomb or configurable comb block with a bee type, e.g.
    /give @s productivebees:configurable_comb[productivebees:bee_type="productivebees:ender"]
    
  3. Put the item into a Bulk Cell / use it as the Bulk Cell filter with a compression card installed.
  4. Observe whether MEGACells detects a compression chain.
  5. As a comparison, manually create or give a productivebees:configurable_comb stack without any NBT/data components.
    /give @s productivebees:configurable_comb
    
  6. Put that no-data stack into the same Bulk Cell setup.

Expected Behavior

MEGACells should detect the reversible compression chain for each concrete Productive Bees bee type:

configurable_honeycomb{bee_type=xxx} <-> configurable_comb{bee_type=xxx}

The generated chain should preserve the bee_type component so that compression and decompression do not produce generic/no-data items.

Actual Behavior

MEGACells does not detect the compression chain for normal Productive Bees configurable comb items that contain productivebees:bee_type.

Image

However, a manually created no-NBT/no-component productivebees:configurable_comb stack is detected correctly. This shows that the recipe classification itself is mostly working, but the generated chain only matches the no-component template stack.

Image

Cause / Analysis

Productive Bees implements these as dynamic/special crafting recipes.

The recipe result returned by CraftingRecipe#getResultItem(...) is only a template stack and does not contain productivebees:bee_type. The real output gets its bee type inside assemble(...), where Productive Bees copies the bee_type component from the input stack to the output stack.

MEGACells currently builds compression chains during recipe loading from:

  • recipe.getResultItem(access)
  • recipe.getIngredients().getFirst().getItems()

This means the generated chain contains stacks like:

productivebees:configurable_honeycomb
productivebees:configurable_comb

without productivebees:bee_type.

Later, chain lookup uses strict component matching via:

ItemStack.isSameItemSameComponents(...)

So an actual stack like:

productivebees:configurable_comb{productivebees:bee_type=xxx}

does not match the generated no-component chain variant.

In short: MEGACells discovers the generic item relationship, but the chain is generated from template stacks and loses the dynamic Productive Bees data component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions