Skip to content

EU to FE conversion with cables having compatibility issues #4286

@alwaeles

Description

@alwaeles

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

7.4.0

Minecraft Version

1.20.1 Forge

Recipe Viewer Installed

JEI

Environment

Singleplayer

Cross-Mod Interaction

Yes

Other Installed Mods

  • Industrial Foregoing (later referenced as IF)
  • Titanium (IF depends on this)

Expected Behavior

Being able to provide energy to IF machines using GT cables EU to FE compat.

Actual Behavior

Machine does not receives energy.

Steps to Reproduce

  1. Build test bench:
    a) Place Creative Energy from GT
    b) Place any Cable or Wire from GT next to Creative Energy
    c) Place any powered machine from IF (e.g. Plant Gatherer)
    d) Take Wire Cutter from GT and connect both Creative Energy and the IF machine to the cable.
  2. Configure Creative Energy to the cable's nominal value and set it active.
  3. Check energy level of the IF machine. There's two possible outcomes:
    a) The machine gets energy (expected behavior)
    b) The machine does not get energy (actual behavior)

Additional Information

After some digging in both Forestry: Community Edition (Forestry's Multi-Farm Gearboxes does work with the compat) and Titanium source code, I realized that there were two different capabilities used for Forge Energy:

  1. net.minecraftforge.common.capabilities.ForgeCapabilities.ENERGY (used by GT and Forestry)
  2. net.minecraftforge.energy.CapabilityEnergy.ENERGY (used by Titanium dependencies including IF)

Both capabilities apparently uses net.minecraftforge.energy.IEnergyStorage so I expect that both (1) and (2) works the same way which means that where every occurence of (1) adding an OR statement to test for (2) would not cause any issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions